mirror of
https://github.com/swaywm/sway.git
synced 2026-04-04 07:15:48 -04:00
Use an enum instead of a marker string for map_to_
This commit is contained in:
parent
4829f1c26a
commit
7f54495b5e
5 changed files with 45 additions and 40 deletions
|
|
@ -16,6 +16,7 @@ struct cmd_results *input_cmd_map_to_output(int argc, char **argv) {
|
|||
return cmd_results_new(CMD_FAILURE, "No input device defined.");
|
||||
}
|
||||
|
||||
ic->mapped_to = MAPPED_TO_OUTPUT;
|
||||
ic->mapped_to_output = strdup(argv[0]);
|
||||
|
||||
return cmd_results_new(CMD_SUCCESS, NULL);
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@ struct cmd_results *input_cmd_map_to_region(int argc, char **argv) {
|
|||
return cmd_results_new(CMD_FAILURE, "No input device defined");
|
||||
}
|
||||
|
||||
// This is used to clear the current output mapping.
|
||||
ic->mapped_to_output = strdup("");
|
||||
|
||||
ic->mapped_to = MAPPED_TO_REGION;
|
||||
ic->mapped_to_region = calloc(1, sizeof(struct wlr_box));
|
||||
|
||||
const char *errstr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue