Fix - get correct type and unbind finally

This commit is contained in:
Peter Junos 2015-05-27 02:08:07 +02:00
parent 7d88aebbf9
commit f50ed9a1e8
1 changed files with 11 additions and 1 deletions

12
xkb.c
View File

@ -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();
}