mirror of
https://github.com/NickHu/sway
synced 2024-12-28 22:23:30 +01:00
Fix overwriting current pressed keys.
This fixes a bug where the key at index 0 in the `key_state_array` would be overwritten by the next pressed key. This broke any bindings consisting of multiple non-mod keys like: `$mod+a+b`.
This commit is contained in:
parent
7d5ef6bc84
commit
e62c49f83c
1 changed files with 2 additions and 2 deletions
|
@ -36,8 +36,8 @@ static uint8_t find_key(uint32_t key_sym, uint32_t key_code, bool update) {
|
|||
if (0 == key_sym && 0 == key_code && key_state_array[i].key_sym == 0) {
|
||||
break;
|
||||
}
|
||||
if (key_state_array[i].key_sym == key_sym
|
||||
|| key_state_array[i].alt_sym == key_sym) {
|
||||
if (key_sym != 0 && (key_state_array[i].key_sym == key_sym
|
||||
|| key_state_array[i].alt_sym == key_sym)) {
|
||||
break;
|
||||
}
|
||||
if (update && key_state_array[i].key_code == key_code) {
|
||||
|
|
Loading…
Reference in a new issue