summaryrefslogtreecommitdiff
path: root/sway/input/keyboard.c
diff options
context:
space:
mode:
authorRyan Dwyer <[email protected]>2018-06-29 20:04:24 +1000
committerRyan Dwyer <[email protected]>2018-06-29 20:04:24 +1000
commita2fbb20a616444213ff3967b33eed7f4561e3978 (patch)
tree276a133eb78d6e0655bc164693650454d43a22ca /sway/input/keyboard.c
parent3c81a900b766dd2c049ba7af6e603805893e0926 (diff)
parentd3ea07f8283385d015e1d85b5fe9bc8a776fc7b4 (diff)
Merge remote-tracking branch 'upstream/master' into atomic
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r--sway/input/keyboard.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index 9e093828..ec149d06 100644
--- 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;