diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-02-27 17:42:50 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-02-27 17:42:50 +0100 |
commit | 15ad8e1da3d37ce1b7c8574e8f70ecc71a5497eb (patch) | |
tree | 8a404c76f0dda3cfdc9ceb23b789c255657c97d9 /source/rofi.c | |
parent | 9cb582930345ab0a0e64b31d934e53c344750071 (diff) |
Removing XCB from view.c, paste less
Diffstat (limited to 'source/rofi.c')
-rw-r--r-- | source/rofi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/rofi.c b/source/rofi.c index 1bfc0387..2cfd706b 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -36,6 +36,7 @@ #include <locale.h> #include <xcb/xcb.h> #include <xcb/xcb_aux.h> +#include <xcb/xcb_ewmh.h> #include <xcb/xkb.h> #include <xkbcommon/xkbcommon.h> #include <xkbcommon/xkbcommon-compose.h> @@ -76,6 +77,7 @@ const char *cache_dir = NULL; SnDisplay *sndisplay = NULL; SnLauncheeContext *sncontext = NULL; xcb_connection_t *xcb_connection = NULL; +xcb_ewmh_connection_t xcb_ewmh; xcb_screen_t *xcb_screen = NULL; struct xkb_stuff xkb = { NULL }; Display *display = NULL; @@ -657,6 +659,13 @@ int main ( int argc, char *argv[] ) xcb_connection = XGetXCBConnection ( display ); xcb_screen = xcb_aux_get_screen ( xcb_connection, DefaultScreen ( display ) ); + xcb_intern_atom_cookie_t *ac = xcb_ewmh_init_atoms(xcb_connection, &xcb_ewmh); + xcb_generic_error_t **errors = NULL; + xcb_ewmh_init_atoms_replies(&xcb_ewmh, ac, errors); + if (errors){ + fprintf(stderr, "Failed to create EWMH atoms\n"); + } + if ( xkb_x11_setup_xkb_extension ( xcb_connection, XKB_X11_MIN_MAJOR_XKB_VERSION, XKB_X11_MIN_MINOR_XKB_VERSION, XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS, NULL, NULL, &xkb.first_event, NULL ) < 0 ) { fprintf ( stderr, "cannot setup XKB extension!\n" ); |