sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 1eede432fc18ee7da7373d869699ca5d2c5f0eaa
parent c4b900c1e04ec45b481a3f05870d8b4a6c49e386
Author: Armin Preiml <apreiml@strohwolke.at>
Date:   Thu, 28 Jun 2018 15:22:04 +0200

fix handling key modifiers if not pressed at first

fixes #2169

Diffstat:
Msway/input/keyboard.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c @@ -64,12 +64,12 @@ static void update_shortcut_state(struct sway_shortcut_state *state, bool last_key_was_a_modifier = raw_modifiers != state->last_raw_modifiers; state->last_raw_modifiers = raw_modifiers; - if (event->state == WLR_KEY_PRESSED) { - if (last_key_was_a_modifier && state->last_keycode) { - // Last pressed key before this one was a modifier - state_erase_key(state, state->last_keycode); - } + if (last_key_was_a_modifier && state->last_keycode) { + // Last pressed key before this one was a modifier + state_erase_key(state, state->last_keycode); + } + if (event->state == WLR_KEY_PRESSED) { // Add current key to set; there may be duplicates state_add_key(state, event->keycode, new_key); state->last_keycode = event->keycode;