summaryrefslogtreecommitdiffstats
path: root/sway/commands/input/dwt.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-12 09:02:30 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-12 09:03:58 -0500
commit538903bc5ace56c1dab0f5287fb4d0bab78a0165 (patch)
treed45d08f64e98a76c730145cf3ea75dd199d9f6c8 /sway/commands/input/dwt.c
parentsway input device (diff)
downloadsway-538903bc5ace56c1dab0f5287fb4d0bab78a0165.tar.gz
sway-538903bc5ace56c1dab0f5287fb4d0bab78a0165.tar.zst
sway-538903bc5ace56c1dab0f5287fb4d0bab78a0165.zip
config cleanup
Diffstat (limited to 'sway/commands/input/dwt.c')
-rw-r--r--sway/commands/input/dwt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/commands/input/dwt.c b/sway/commands/input/dwt.c
index f3cbf252..0954575c 100644
--- a/sway/commands/input/dwt.c
+++ b/sway/commands/input/dwt.c
@@ -11,14 +11,16 @@ struct cmd_results *input_cmd_dwt(int argc, char **argv) {
11 if (!current_input_config) { 11 if (!current_input_config) {
12 return cmd_results_new(CMD_FAILURE, "dwt", "No input device defined."); 12 return cmd_results_new(CMD_FAILURE, "dwt", "No input device defined.");
13 } 13 }
14 struct input_config *new_config = new_input_config(current_input_config->identifier); 14 struct input_config *new_config =
15 new_input_config(current_input_config->identifier);
15 16
16 if (strcasecmp(argv[0], "enabled") == 0) { 17 if (strcasecmp(argv[0], "enabled") == 0) {
17 new_config->dwt = LIBINPUT_CONFIG_DWT_ENABLED; 18 new_config->dwt = LIBINPUT_CONFIG_DWT_ENABLED;
18 } else if (strcasecmp(argv[0], "disabled") == 0) { 19 } else if (strcasecmp(argv[0], "disabled") == 0) {
19 new_config->dwt = LIBINPUT_CONFIG_DWT_DISABLED; 20 new_config->dwt = LIBINPUT_CONFIG_DWT_DISABLED;
20 } else { 21 } else {
21 return cmd_results_new(CMD_INVALID, "dwt", "Expected 'dwt <enabled|disabled>'"); 22 return cmd_results_new(CMD_INVALID, "dwt",
23 "Expected 'dwt <enabled|disabled>'");
22 } 24 }
23 25
24 input_cmd_apply(new_config); 26 input_cmd_apply(new_config);