diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-09-23 19:56:52 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-09-23 19:56:52 -0400 |
commit | baeb28ea6230ef9aa409ee52abe208720120e45c (patch) | |
tree | d5a6fffc3470b3fbbb18a6ae01851451bea1dbb2 /sway/commands/input/natural_scroll.c | |
parent | Merge pull request #2699 from RedSoxFan/fix-2667 (diff) | |
download | sway-baeb28ea6230ef9aa409ee52abe208720120e45c.tar.gz sway-baeb28ea6230ef9aa409ee52abe208720120e45c.tar.zst sway-baeb28ea6230ef9aa409ee52abe208720120e45c.zip |
Implement support for input wildcard
Diffstat (limited to 'sway/commands/input/natural_scroll.c')
-rw-r--r-- | sway/commands/input/natural_scroll.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sway/commands/input/natural_scroll.c b/sway/commands/input/natural_scroll.c index 77c3ff00..e2a93500 100644 --- a/sway/commands/input/natural_scroll.c +++ b/sway/commands/input/natural_scroll.c | |||
@@ -10,17 +10,13 @@ struct cmd_results *input_cmd_natural_scroll(int argc, char **argv) { | |||
10 | if ((error = checkarg(argc, "natural_scroll", EXPECTED_AT_LEAST, 1))) { | 10 | if ((error = checkarg(argc, "natural_scroll", EXPECTED_AT_LEAST, 1))) { |
11 | return error; | 11 | return error; |
12 | } | 12 | } |
13 | struct input_config *current_input_config = | 13 | struct input_config *ic = config->handler_context.input_config; |
14 | config->handler_context.input_config; | 14 | if (!ic) { |
15 | if (!current_input_config) { | ||
16 | return cmd_results_new(CMD_FAILURE, "natural_scoll", | 15 | return cmd_results_new(CMD_FAILURE, "natural_scoll", |
17 | "No input device defined."); | 16 | "No input device defined."); |
18 | } | 17 | } |
19 | struct input_config *new_config = | ||
20 | new_input_config(current_input_config->identifier); | ||
21 | 18 | ||
22 | new_config->natural_scroll = parse_boolean(argv[0], true); | 19 | ic->natural_scroll = parse_boolean(argv[0], true); |
23 | 20 | ||
24 | apply_input_config(new_config); | ||
25 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 21 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
26 | } | 22 | } |