Bugfix: load new keymap _before_ translating keysyms (Thanks Airblader)

fixes #1919
This commit is contained in:
Michael Stapelberg 2015-09-17 22:34:59 +02:00
parent d4fb17546c
commit eb4a174788
1 changed files with 2 additions and 2 deletions

View File

@ -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); DLOG("xkb new keyboard notify, sequence %d, time %d\n", state->sequence, state->time);
xcb_key_symbols_free(keysyms); xcb_key_symbols_free(keysyms);
keysyms = xcb_key_symbols_alloc(conn); 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); ungrab_all_keys(conn);
translate_keysyms(); translate_keysyms();
grab_all_keys(conn); 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) { } else if (state->xkbType == XCB_XKB_MAP_NOTIFY) {
if (event_is_ignored(event->sequence, type)) { if (event_is_ignored(event->sequence, type)) {
DLOG("Ignoring map notify event for sequence %d.\n", state->sequence); DLOG("Ignoring map notify event for sequence %d.\n", state->sequence);