keyboard: include pressed modifiers in bound set

This prevents applications from seeing and handling the release event
for a modifier key that was part of a keybinding (e.g. Firefox displays
its menu bar for a lone Alt press + release).
This commit is contained in:
John Lindgren 2023-11-10 23:43:46 -05:00 committed by Johan Malm
parent fe9491443c
commit 98bf316ee6
3 changed files with 18 additions and 5 deletions

View file

@ -237,7 +237,7 @@ handle_compositor_keybindings(struct keyboard *keyboard,
}
key_state_set_pressed(event->keycode,
event->state == WL_KEYBOARD_KEY_STATE_PRESSED);
event->state == WL_KEYBOARD_KEY_STATE_PRESSED, is_modifier);
if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED) {
/*