Add xcb-xfixes as a new dependency and initialise it

This commit prepares changes in the following commits

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2019-02-06 09:21:26 +01:00
parent a7474412da
commit 2023ed187a
5 changed files with 14 additions and 1 deletions

View File

@ -37,7 +37,7 @@ install:
# Install build dependencies. # Install build dependencies.
# See also `apt-cache showsrc awesome | grep -E '^(Version|Build-Depends)'`. # See also `apt-cache showsrc awesome | grep -E '^(Version|Build-Depends)'`.
- sudo apt-get install -y libcairo2-dev gir1.2-gtk-3.0 libpango1.0-dev libxcb-xtest0-dev libxcb-icccm4-dev libxcb-randr0-dev libxcb-keysyms1-dev libxcb-xinerama0-dev libdbus-1-dev libxdg-basedir-dev libstartup-notification0-dev imagemagick libxcb1-dev libxcb-shape0-dev libxcb-util0-dev libx11-xcb-dev libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev - sudo apt-get install -y libcairo2-dev gir1.2-gtk-3.0 libpango1.0-dev libxcb-xtest0-dev libxcb-icccm4-dev libxcb-randr0-dev libxcb-keysyms1-dev libxcb-xinerama0-dev libdbus-1-dev libxdg-basedir-dev libstartup-notification0-dev imagemagick libxcb1-dev libxcb-shape0-dev libxcb-util0-dev libx11-xcb-dev libxcb-cursor-dev libxcb-xkb-dev libxcb-xfixes0-dev libxkbcommon-dev libxkbcommon-x11-dev
- sudo gem install asciidoctor - sudo gem install asciidoctor
# Deps for tests. # Deps for tests.

View File

@ -53,6 +53,7 @@
#include <xcb/xinerama.h> #include <xcb/xinerama.h>
#include <xcb/xtest.h> #include <xcb/xtest.h>
#include <xcb/shape.h> #include <xcb/shape.h>
#include <xcb/xfixes.h>
#include <glib-unix.h> #include <glib-unix.h>
@ -733,6 +734,7 @@ main(int argc, char **argv)
xcb_prefetch_extension_data(globalconf.connection, &xcb_randr_id); xcb_prefetch_extension_data(globalconf.connection, &xcb_randr_id);
xcb_prefetch_extension_data(globalconf.connection, &xcb_xinerama_id); xcb_prefetch_extension_data(globalconf.connection, &xcb_xinerama_id);
xcb_prefetch_extension_data(globalconf.connection, &xcb_shape_id); xcb_prefetch_extension_data(globalconf.connection, &xcb_shape_id);
xcb_prefetch_extension_data(globalconf.connection, &xcb_xfixes_id);
if (xcb_cursor_context_new(globalconf.connection, globalconf.screen, &globalconf.cursor_ctx) < 0) if (xcb_cursor_context_new(globalconf.connection, globalconf.screen, &globalconf.cursor_ctx) < 0)
fatal("Failed to initialize xcb-cursor"); fatal("Failed to initialize xcb-cursor");
@ -794,6 +796,13 @@ main(int argc, char **argv)
p_delete(&reply); p_delete(&reply);
} }
/* check for xfixes extension */
query = xcb_get_extension_data(globalconf.connection, &xcb_xfixes_id);
globalconf.have_xfixes = query && query->present;
if (globalconf.have_xfixes)
xcb_discard_reply(globalconf.connection,
xcb_xfixes_query_version(globalconf.connection, 1, 0).sequence);
event_init(); event_init();
/* Allocate the key symbols */ /* Allocate the key symbols */

View File

@ -141,6 +141,7 @@ set(AWESOME_DEPENDENCIES
xcb-keysyms>=0.3.4 xcb-keysyms>=0.3.4
xcb-icccm xcb-icccm
xcb-icccm>=0.3.8 xcb-icccm>=0.3.8
xcb-xfixes
# NOTE: it's not clear what version is required, but 1.10 works at least. # NOTE: it's not clear what version is required, but 1.10 works at least.
# See https://github.com/awesomeWM/awesome/pull/149#issuecomment-94208356. # See https://github.com/awesomeWM/awesome/pull/149#issuecomment-94208356.
xcb-xkb xcb-xkb

View File

@ -68,6 +68,7 @@ environment):
- [libxcb-util >= 0.3.8](https://xcb.freedesktop.org/) - [libxcb-util >= 0.3.8](https://xcb.freedesktop.org/)
- [libxcb-keysyms >= 0.3.4](https://xcb.freedesktop.org/) - [libxcb-keysyms >= 0.3.4](https://xcb.freedesktop.org/)
- [libxcb-icccm >= 0.3.8](https://xcb.freedesktop.org/) - [libxcb-icccm >= 0.3.8](https://xcb.freedesktop.org/)
- [libxcb-xfixes](https://xcb.freedesktop.org/)
- [xcb-util-xrm >= 1.0](https://github.com/Airblader/xcb-util-xrm) - [xcb-util-xrm >= 1.0](https://github.com/Airblader/xcb-util-xrm)
- [libxkbcommon](http://xkbcommon.org/) with X11 support enabled - [libxkbcommon](http://xkbcommon.org/) with X11 support enabled
- [libstartup-notification >= - [libstartup-notification >=

View File

@ -110,6 +110,8 @@ typedef struct
bool have_input_shape; bool have_input_shape;
/** Check for XKB extension */ /** Check for XKB extension */
bool have_xkb; bool have_xkb;
/** Check for XFixes extension */
bool have_xfixes;
uint8_t event_base_shape; uint8_t event_base_shape;
uint8_t event_base_xkb; uint8_t event_base_xkb;
uint8_t event_base_randr; uint8_t event_base_randr;