diff options
Diffstat (limited to 'sway/commands/input/drag_lock.c')
-rw-r--r-- | sway/commands/input/drag_lock.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/commands/input/drag_lock.c b/sway/commands/input/drag_lock.c index 11e7fbea..149a6183 100644 --- a/sway/commands/input/drag_lock.c +++ b/sway/commands/input/drag_lock.c | |||
@@ -9,16 +9,19 @@ struct cmd_results *input_cmd_drag_lock(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, "drag_lock", "No input device defined."); | 12 | return cmd_results_new(CMD_FAILURE, |
13 | "drag_lock", "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->drag_lock = LIBINPUT_CONFIG_DRAG_LOCK_ENABLED; | 19 | new_config->drag_lock = LIBINPUT_CONFIG_DRAG_LOCK_ENABLED; |
18 | } else if (strcasecmp(argv[0], "disabled") == 0) { | 20 | } else if (strcasecmp(argv[0], "disabled") == 0) { |
19 | new_config->drag_lock = LIBINPUT_CONFIG_DRAG_LOCK_DISABLED; | 21 | new_config->drag_lock = LIBINPUT_CONFIG_DRAG_LOCK_DISABLED; |
20 | } else { | 22 | } else { |
21 | return cmd_results_new(CMD_INVALID, "drag_lock", "Expected 'drag_lock <enabled|disabled>'"); | 23 | return cmd_results_new(CMD_INVALID, "drag_lock", |
24 | "Expected 'drag_lock <enabled|disabled>'"); | ||
22 | } | 25 | } |
23 | 26 | ||
24 | input_cmd_apply(new_config); | 27 | input_cmd_apply(new_config); |