Merge pull request #875 from Ongy/keyboard_order

reorder xkb state handling in wlr_keyboard
This commit is contained in:
Drew DeVault 2018-04-18 08:38:26 -04:00 committed by GitHub
commit c18afd6731
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,6 +120,10 @@ void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
if (keyboard->xkb_state == NULL) { if (keyboard->xkb_state == NULL) {
return; return;
} }
keyboard_key_update(keyboard, event);
wlr_signal_emit_safe(&keyboard->events.key, event);
if (event->update_state) { if (event->update_state) {
uint32_t keycode = event->keycode + 8; uint32_t keycode = event->keycode + 8;
xkb_state_update_key(keyboard->xkb_state, keycode, xkb_state_update_key(keyboard->xkb_state, keycode,
@ -131,9 +135,6 @@ void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
if (updated) { if (updated) {
wlr_signal_emit_safe(&keyboard->events.modifiers, keyboard); 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, void wlr_keyboard_init(struct wlr_keyboard *kb,