diff options
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/input/map_to_output.c | 1 | ||||
-rw-r--r-- | sway/commands/input/map_to_region.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/sway/commands/input/map_to_output.c b/sway/commands/input/map_to_output.c index 6d623186..f60fb7d5 100644 --- a/sway/commands/input/map_to_output.c +++ b/sway/commands/input/map_to_output.c | |||
@@ -16,6 +16,7 @@ struct cmd_results *input_cmd_map_to_output(int argc, char **argv) { | |||
16 | return cmd_results_new(CMD_FAILURE, "No input device defined."); | 16 | return cmd_results_new(CMD_FAILURE, "No input device defined."); |
17 | } | 17 | } |
18 | 18 | ||
19 | ic->mapped_to = MAPPED_TO_OUTPUT; | ||
19 | ic->mapped_to_output = strdup(argv[0]); | 20 | ic->mapped_to_output = strdup(argv[0]); |
20 | 21 | ||
21 | return cmd_results_new(CMD_SUCCESS, NULL); | 22 | return cmd_results_new(CMD_SUCCESS, NULL); |
diff --git a/sway/commands/input/map_to_region.c b/sway/commands/input/map_to_region.c index e0b69ed5..e85495e5 100644 --- a/sway/commands/input/map_to_region.c +++ b/sway/commands/input/map_to_region.c | |||
@@ -15,9 +15,7 @@ struct cmd_results *input_cmd_map_to_region(int argc, char **argv) { | |||
15 | return cmd_results_new(CMD_FAILURE, "No input device defined"); | 15 | return cmd_results_new(CMD_FAILURE, "No input device defined"); |
16 | } | 16 | } |
17 | 17 | ||
18 | // This is used to clear the current output mapping. | 18 | ic->mapped_to = MAPPED_TO_REGION; |
19 | ic->mapped_to_output = strdup(""); | ||
20 | |||
21 | ic->mapped_to_region = calloc(1, sizeof(struct wlr_box)); | 19 | ic->mapped_to_region = calloc(1, sizeof(struct wlr_box)); |
22 | 20 | ||
23 | const char *errstr; | 21 | const char *errstr; |