mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
input/keyboard: handle event->group_update
When a keyboard is added to or removed from a wlr_keyboard_group, a key event will be emitted for all keys that only pressed for that keyboard in the group. This allows for compositors to update their internal state. However because these keys were already down, bindings should not be executed and surfaces should not receive a key event.
This commit is contained in:
parent
ed9b4e6aeb
commit
bfabcc181f
1 changed files with 6 additions and 0 deletions
|
|
@ -359,6 +359,12 @@ static void handle_key_event(struct sway_keyboard *keyboard,
|
|||
code_modifiers);
|
||||
}
|
||||
|
||||
// A keyboard was added to/removed from the group, just update the status
|
||||
if (event->group_update) {
|
||||
assert(wlr_keyboard_group_from_wlr_keyboard(wlr_device->keyboard));
|
||||
return;
|
||||
}
|
||||
|
||||
bool handled = false;
|
||||
// Identify active release binding
|
||||
struct sway_binding *binding_released = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue