aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/commands/bind.c1
-rw-r--r--sway/input/switch.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index 4e49982a..de2e7bd4 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -608,6 +608,7 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding)
608 return; 608 return;
609 } 609 }
610 memcpy(deferred, binding, sizeof(struct sway_binding)); 610 memcpy(deferred, binding, sizeof(struct sway_binding));
611 deferred->command = strdup(binding->command);
611 list_add(seat->deferred_bindings, deferred); 612 list_add(seat->deferred_bindings, deferred);
612 return; 613 return;
613 } 614 }
diff --git a/sway/input/switch.c b/sway/input/switch.c
index 3bbc636d..b7c28df1 100644
--- a/sway/input/switch.c
+++ b/sway/input/switch.c
@@ -1,4 +1,3 @@
1#define _POSIX_C_SOURCE 200809L
2#include "sway/config.h" 1#include "sway/config.h"
3#include "sway/desktop/transaction.h" 2#include "sway/desktop/transaction.h"
4#include "sway/input/switch.h" 3#include "sway/input/switch.h"
@@ -57,7 +56,7 @@ static void execute_binding(struct sway_switch *sway_switch) {
57 calloc(1, sizeof(struct sway_binding)); 56 calloc(1, sizeof(struct sway_binding));
58 dummy_binding->type = BINDING_SWITCH; 57 dummy_binding->type = BINDING_SWITCH;
59 dummy_binding->flags = matched_binding->flags; 58 dummy_binding->flags = matched_binding->flags;
60 dummy_binding->command = strdup(matched_binding->command); 59 dummy_binding->command = matched_binding->command;
61 60
62 seat_execute_command(seat, dummy_binding); 61 seat_execute_command(seat, dummy_binding);
63 free(dummy_binding); 62 free(dummy_binding);