diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-12 09:02:30 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-12 09:03:58 -0500 |
commit | 538903bc5ace56c1dab0f5287fb4d0bab78a0165 (patch) | |
tree | d45d08f64e98a76c730145cf3ea75dd199d9f6c8 /sway/commands/input/tap.c | |
parent | sway input device (diff) | |
download | sway-538903bc5ace56c1dab0f5287fb4d0bab78a0165.tar.gz sway-538903bc5ace56c1dab0f5287fb4d0bab78a0165.tar.zst sway-538903bc5ace56c1dab0f5287fb4d0bab78a0165.zip |
config cleanup
Diffstat (limited to 'sway/commands/input/tap.c')
-rw-r--r-- | sway/commands/input/tap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/commands/input/tap.c b/sway/commands/input/tap.c index 1109466f..18a54087 100644 --- a/sway/commands/input/tap.c +++ b/sway/commands/input/tap.c | |||
@@ -13,17 +13,20 @@ struct cmd_results *input_cmd_tap(int argc, char **argv) { | |||
13 | if (!current_input_config) { | 13 | if (!current_input_config) { |
14 | return cmd_results_new(CMD_FAILURE, "tap", "No input device defined."); | 14 | return cmd_results_new(CMD_FAILURE, "tap", "No input device defined."); |
15 | } | 15 | } |
16 | struct input_config *new_config = new_input_config(current_input_config->identifier); | 16 | struct input_config *new_config = |
17 | new_input_config(current_input_config->identifier); | ||
17 | 18 | ||
18 | if (strcasecmp(argv[0], "enabled") == 0) { | 19 | if (strcasecmp(argv[0], "enabled") == 0) { |
19 | new_config->tap = LIBINPUT_CONFIG_TAP_ENABLED; | 20 | new_config->tap = LIBINPUT_CONFIG_TAP_ENABLED; |
20 | } else if (strcasecmp(argv[0], "disabled") == 0) { | 21 | } else if (strcasecmp(argv[0], "disabled") == 0) { |
21 | new_config->tap = LIBINPUT_CONFIG_TAP_DISABLED; | 22 | new_config->tap = LIBINPUT_CONFIG_TAP_DISABLED; |
22 | } else { | 23 | } else { |
23 | return cmd_results_new(CMD_INVALID, "tap", "Expected 'tap <enabled|disabled>'"); | 24 | return cmd_results_new(CMD_INVALID, "tap", |
25 | "Expected 'tap <enabled|disabled>'"); | ||
24 | } | 26 | } |
25 | 27 | ||
26 | sway_log(L_DEBUG, "apply-tap for device: %s", current_input_config->identifier); | 28 | sway_log(L_DEBUG, "apply-tap for device: %s", |
29 | current_input_config->identifier); | ||
27 | input_cmd_apply(new_config); | 30 | input_cmd_apply(new_config); |
28 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 31 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
29 | } | 32 | } |