mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
src/keyboard.c: always try to remove keys from the pressed set on release
Fixes: #1200 Reported-by: @kyak
This commit is contained in:
parent
db591d1400
commit
2b81d09626
1 changed files with 10 additions and 3 deletions
|
|
@ -241,9 +241,16 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
||||||
is_layout_switch |= translated.syms[i] == XKB_KEY_ISO_Next_Group;
|
is_layout_switch |= translated.syms[i] == XKB_KEY_ISO_Next_Group;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_modifier && !is_layout_switch) {
|
/*
|
||||||
key_state_set_pressed(event->keycode,
|
* An earlier press event from a key that causes a layout change event
|
||||||
event->state == WL_KEYBOARD_KEY_STATE_PRESSED);
|
* might have been added already without us knowing that it actually was
|
||||||
|
* a XKB_KEY_ISO_Next_Group sym. Thus we always try to remove the current
|
||||||
|
* key from the set of pressed keys on release.
|
||||||
|
*/
|
||||||
|
if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED) {
|
||||||
|
key_state_set_pressed(event->keycode, false);
|
||||||
|
} else if (!is_modifier && !is_layout_switch) {
|
||||||
|
key_state_set_pressed(event->keycode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue