input: reset modifier state on keyboard-leave

This commit is contained in:
Daniel Eklöf 2020-01-13 19:58:57 +01:00
parent 727be358df
commit c80cbc9a79
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -151,6 +151,11 @@ keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
wayl->kbd_focus = NULL; wayl->kbd_focus = NULL;
stop_repeater(wayl, -1); stop_repeater(wayl, -1);
wayl->kbd.shift = false;;
wayl->kbd.alt = false;;
wayl->kbd.ctrl = false;;
wayl->kbd.meta = false;;
if (old_focused != NULL) { if (old_focused != NULL) {
term_kbd_focus_out(old_focused); term_kbd_focus_out(old_focused);
term_xcursor_update(old_focused); term_xcursor_update(old_focused);