diff --git a/.travis.yml b/.travis.yml index 29110628f..69e3a8c4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: # Install build dependencies. # 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 # Deps for tests. diff --git a/awesome.c b/awesome.c index e711cf70a..4a058acc3 100644 --- a/awesome.c +++ b/awesome.c @@ -53,6 +53,7 @@ #include #include #include +#include #include @@ -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_xinerama_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) fatal("Failed to initialize xcb-cursor"); @@ -794,6 +796,13 @@ main(int argc, char **argv) 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(); /* Allocate the key symbols */ diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 79eae7e72..9c6d5f426 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -141,6 +141,7 @@ set(AWESOME_DEPENDENCIES xcb-keysyms>=0.3.4 xcb-icccm xcb-icccm>=0.3.8 + xcb-xfixes # 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. xcb-xkb diff --git a/docs/01-readme.md b/docs/01-readme.md index b983ab6e9..7a997d5a8 100644 --- a/docs/01-readme.md +++ b/docs/01-readme.md @@ -68,6 +68,7 @@ environment): - [libxcb-util >= 0.3.8](https://xcb.freedesktop.org/) - [libxcb-keysyms >= 0.3.4](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) - [libxkbcommon](http://xkbcommon.org/) with X11 support enabled - [libstartup-notification >= diff --git a/globalconf.h b/globalconf.h index 46d42fd4a..9224bd373 100644 --- a/globalconf.h +++ b/globalconf.h @@ -110,6 +110,8 @@ typedef struct bool have_input_shape; /** Check for XKB extension */ bool have_xkb; + /** Check for XFixes extension */ + bool have_xfixes; uint8_t event_base_shape; uint8_t event_base_xkb; uint8_t event_base_randr;