diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-18 08:38:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-18 08:38:26 -0400 |
commit | c18afd6731270cf3243586989416bc2168d7588f (patch) | |
tree | 1e9d43d3bb006dabcda5f3cf48c721b197e724b7 | |
parent | dbdc63ddde4d1e8a76dc80a64d8910ed30aad318 (diff) | |
parent | c8ccb1bef32934ad78e42d8f622e3495095c0f40 (diff) |
Merge pull request #875 from Ongy/keyboard_order
reorder xkb state handling in wlr_keyboard
-rw-r--r-- | types/wlr_keyboard.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/types/wlr_keyboard.c b/types/wlr_keyboard.c index 5c0699ff..8a5bd7e2 100644 --- a/types/wlr_keyboard.c +++ b/types/wlr_keyboard.c @@ -120,6 +120,10 @@ void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard, if (keyboard->xkb_state == NULL) { return; } + + keyboard_key_update(keyboard, event); + wlr_signal_emit_safe(&keyboard->events.key, event); + if (event->update_state) { uint32_t keycode = event->keycode + 8; xkb_state_update_key(keyboard->xkb_state, keycode, @@ -131,9 +135,6 @@ void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard, if (updated) { wlr_signal_emit_safe(&keyboard->events.modifiers, keyboard); } - - keyboard_key_update(keyboard, event); - wlr_signal_emit_safe(&keyboard->events.key, event); } void wlr_keyboard_init(struct wlr_keyboard *kb, |