diff options
-rw-r--r-- | sway/input/switch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/input/switch.c b/sway/input/switch.c index b7c28df1..8347f066 100644 --- a/sway/input/switch.c +++ b/sway/input/switch.c | |||
@@ -1,8 +1,10 @@ | |||
1 | #define _POSIX_C_SOURCE 200809L | ||
1 | #include "sway/config.h" | 2 | #include "sway/config.h" |
2 | #include "sway/desktop/transaction.h" | 3 | #include "sway/desktop/transaction.h" |
3 | #include "sway/input/switch.h" | 4 | #include "sway/input/switch.h" |
4 | #include <wlr/types/wlr_idle.h> | 5 | #include <wlr/types/wlr_idle.h> |
5 | #include "log.h" | 6 | #include "log.h" |
7 | #include <string.h> | ||
6 | 8 | ||
7 | struct sway_switch *sway_switch_create(struct sway_seat *seat, | 9 | struct sway_switch *sway_switch_create(struct sway_seat *seat, |
8 | struct sway_seat_device *device) { | 10 | struct sway_seat_device *device) { |
@@ -56,7 +58,7 @@ static void execute_binding(struct sway_switch *sway_switch) { | |||
56 | calloc(1, sizeof(struct sway_binding)); | 58 | calloc(1, sizeof(struct sway_binding)); |
57 | dummy_binding->type = BINDING_SWITCH; | 59 | dummy_binding->type = BINDING_SWITCH; |
58 | dummy_binding->flags = matched_binding->flags; | 60 | dummy_binding->flags = matched_binding->flags; |
59 | dummy_binding->command = matched_binding->command; | 61 | dummy_binding->command = strdup(matched_binding->command); |
60 | 62 | ||
61 | seat_execute_command(seat, dummy_binding); | 63 | seat_execute_command(seat, dummy_binding); |
62 | free(dummy_binding); | 64 | free(dummy_binding); |