diff options
Diffstat (limited to 'sway/commands/input/left_handed.c')
-rw-r--r-- | sway/commands/input/left_handed.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/commands/input/left_handed.c b/sway/commands/input/left_handed.c index 715df2a1..dc8fcd56 100644 --- a/sway/commands/input/left_handed.c +++ b/sway/commands/input/left_handed.c | |||
@@ -9,16 +9,19 @@ struct cmd_results *input_cmd_left_handed(int argc, char **argv) { | |||
9 | return error; | 9 | return error; |
10 | } | 10 | } |
11 | if (!current_input_config) { | 11 | if (!current_input_config) { |
12 | return cmd_results_new(CMD_FAILURE, "left_handed", "No input device defined."); | 12 | return cmd_results_new(CMD_FAILURE, "left_handed", |
13 | "No input device defined."); | ||
13 | } | 14 | } |
14 | struct input_config *new_config = new_input_config(current_input_config->identifier); | 15 | struct input_config *new_config = |
16 | new_input_config(current_input_config->identifier); | ||
15 | 17 | ||
16 | if (strcasecmp(argv[0], "enabled") == 0) { | 18 | if (strcasecmp(argv[0], "enabled") == 0) { |
17 | new_config->left_handed = 1; | 19 | new_config->left_handed = 1; |
18 | } else if (strcasecmp(argv[0], "disabled") == 0) { | 20 | } else if (strcasecmp(argv[0], "disabled") == 0) { |
19 | new_config->left_handed = 0; | 21 | new_config->left_handed = 0; |
20 | } else { | 22 | } else { |
21 | return cmd_results_new(CMD_INVALID, "left_handed", "Expected 'left_handed <enabled|disabled>'"); | 23 | return cmd_results_new(CMD_INVALID, "left_handed", |
24 | "Expected 'left_handed <enabled|disabled>'"); | ||
22 | } | 25 | } |
23 | 26 | ||
24 | input_cmd_apply(new_config); | 27 | input_cmd_apply(new_config); |