From eb4a174788033fe759ec1336a4509625c17547bf Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 17 Sep 2015 22:34:59 +0200 Subject: [PATCH] Bugfix: load new keymap _before_ translating keysyms (Thanks Airblader) fixes #1919 --- src/handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers.c b/src/handlers.c index d0b66374..579fe799 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -1367,11 +1367,11 @@ void handle_event(int type, xcb_generic_event_t *event) { DLOG("xkb new keyboard notify, sequence %d, time %d\n", state->sequence, state->time); xcb_key_symbols_free(keysyms); keysyms = xcb_key_symbols_alloc(conn); + if (((xcb_xkb_new_keyboard_notify_event_t *)event)->changed & XCB_XKB_NKN_DETAIL_KEYCODES) + (void)load_keymap(); ungrab_all_keys(conn); translate_keysyms(); grab_all_keys(conn); - if (((xcb_xkb_new_keyboard_notify_event_t *)event)->changed & XCB_XKB_NKN_DETAIL_KEYCODES) - (void)load_keymap(); } else if (state->xkbType == XCB_XKB_MAP_NOTIFY) { if (event_is_ignored(event->sequence, type)) { DLOG("Ignoring map notify event for sequence %d.\n", state->sequence); -- 2.39.5