From f50ed9a1e8a665868e4c2cfb5cc9b65c36866a14 Mon Sep 17 00:00:00 2001 From: Peter Junos Date: Wed, 27 May 2015 02:08:07 +0200 Subject: [PATCH] Fix - get correct type and unbind finally --- xkb.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xkb.c b/xkb.c index 9d705b31..8282be83 100644 --- a/xkb.c +++ b/xkb.c @@ -262,7 +262,8 @@ xkb_init(void) { fatal("Required xkb extension is not supported"); } - unsigned int map = XCB_XKB_EVENT_TYPE_STATE_NOTIFY | XCB_XKB_EVENT_TYPE_MAP_NOTIFY | XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY; + + uint16_t map = XCB_XKB_EVENT_TYPE_STATE_NOTIFY | XCB_XKB_EVENT_TYPE_MAP_NOTIFY | XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY; // // These maps are provided to allow key remapping, @@ -295,5 +296,14 @@ xkb_init(void) void xkb_free(void) { + // unsubscribe from all events + xcb_xkb_select_events_checked(globalconf.connection, + XCB_XKB_ID_USE_CORE_KBD, + 0, + 0, + 0, + 0, + 0, + 0); xkb_free_keymap(); }