diff options
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r-- | sway/input/keyboard.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 5827a1ca..6dc57d46 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -89,9 +89,12 @@ static bool binding_matches_key_state(struct sway_binding *binding, | |||
89 | return false; | 89 | return false; |
90 | } | 90 | } |
91 | 91 | ||
92 | static void binding_execute_command(struct sway_binding *binding) { | 92 | static void keyboard_execute_command(struct sway_keyboard *keyboard, |
93 | struct sway_binding *binding) { | ||
93 | wlr_log(L_DEBUG, "running command for binding: %s", | 94 | wlr_log(L_DEBUG, "running command for binding: %s", |
94 | binding->command); | 95 | binding->command); |
96 | config_clear_handler_context(config); | ||
97 | config->handler_context.seat = keyboard->seat_device->sway_seat; | ||
95 | struct cmd_results *results = handle_command(binding->command); | 98 | struct cmd_results *results = handle_command(binding->command); |
96 | if (results->status != CMD_SUCCESS) { | 99 | if (results->status != CMD_SUCCESS) { |
97 | wlr_log(L_DEBUG, "could not run command for binding: %s", | 100 | wlr_log(L_DEBUG, "could not run command for binding: %s", |
@@ -160,7 +163,7 @@ static bool keyboard_execute_bindsym(struct sway_keyboard *keyboard, | |||
160 | } | 163 | } |
161 | 164 | ||
162 | if (match) { | 165 | if (match) { |
163 | binding_execute_command(binding); | 166 | keyboard_execute_command(keyboard, binding); |
164 | return true; | 167 | return true; |
165 | } | 168 | } |
166 | } | 169 | } |
@@ -267,7 +270,7 @@ static bool keyboard_execute_bindcode(struct sway_keyboard *keyboard, | |||
267 | for (int i = 0; i < keycode_bindings->length; ++i) { | 270 | for (int i = 0; i < keycode_bindings->length; ++i) { |
268 | struct sway_binding *binding = keycode_bindings->items[i]; | 271 | struct sway_binding *binding = keycode_bindings->items[i]; |
269 | if (binding_matches_keycodes(wlr_keyboard, binding, event)) { | 272 | if (binding_matches_keycodes(wlr_keyboard, binding, event)) { |
270 | binding_execute_command(binding); | 273 | keyboard_execute_command(keyboard, binding); |
271 | return true; | 274 | return true; |
272 | } | 275 | } |
273 | } | 276 | } |