summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/commands/bind.c2
-rw-r--r--sway/input/keyboard.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index 5b56ba30..047018e0 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -329,7 +329,7 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding)
329 binding->command, results->error); 329 binding->command, results->error);
330 } 330 }
331 331
332 if (binding->flags & BINDING_RELOAD) { // free the binding if we made a copy 332 if (binding_copy->flags & BINDING_RELOAD) {
333 free_sway_binding(binding_copy); 333 free_sway_binding(binding_copy);
334 } 334 }
335 free_cmd_results(results); 335 free_cmd_results(results);
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index 0d2a62b5..a74229f5 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -278,12 +278,11 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) {
278 raw_modifiers, false, input_inhibited); 278 raw_modifiers, false, input_inhibited);
279 279
280 if (binding_pressed) { 280 if (binding_pressed) {
281 seat_execute_command(seat, binding_pressed);
282 handled = true;
283
284 if ((binding_pressed->flags & BINDING_RELOAD) == 0) { 281 if ((binding_pressed->flags & BINDING_RELOAD) == 0) {
285 next_repeat_binding = binding_pressed; 282 next_repeat_binding = binding_pressed;
286 } 283 }
284 seat_execute_command(seat, binding_pressed);
285 handled = true;
287 } 286 }
288 } 287 }
289 288