diff options
author | Robert Kubosz <kubosz.robert@gmail.com> | 2018-07-12 12:08:53 +0200 |
---|---|---|
committer | Robert Kubosz <kubosz.robert@gmail.com> | 2018-07-12 12:08:53 +0200 |
commit | 08edaf4e76124a676e9457015e4451b05c355520 (patch) | |
tree | ac5fe767723853718154c0579aed6cca0a311c78 /sway | |
parent | add scroll button option (diff) | |
download | sway-08edaf4e76124a676e9457015e4451b05c355520.tar.gz sway-08edaf4e76124a676e9457015e4451b05c355520.tar.zst sway-08edaf4e76124a676e9457015e4451b05c355520.zip |
increase maximum value of button identifier
and also cleanup spaces
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands/input/scroll_button.c | 2 | ||||
-rw-r--r-- | sway/config/input.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/input/scroll_button.c b/sway/commands/input/scroll_button.c index a9d697cf..7a0fd2e4 100644 --- a/sway/commands/input/scroll_button.c +++ b/sway/commands/input/scroll_button.c | |||
@@ -19,7 +19,7 @@ struct cmd_results *input_cmd_scroll_button(int argc, char **argv) { | |||
19 | new_input_config(current_input_config->identifier); | 19 | new_input_config(current_input_config->identifier); |
20 | 20 | ||
21 | int scroll_button = atoi(argv[0]); | 21 | int scroll_button = atoi(argv[0]); |
22 | if (scroll_button < 1 || scroll_button > 10) { | 22 | if (scroll_button < 0 || scroll_button > 1000) { |
23 | free_input_config(new_config); | 23 | free_input_config(new_config); |
24 | return cmd_results_new(CMD_INVALID, "scroll_button", | 24 | return cmd_results_new(CMD_INVALID, "scroll_button", |
25 | "Input out of range [1, 10]"); | 25 | "Input out of range [1, 10]"); |
diff --git a/sway/config/input.c b/sway/config/input.c index 62d77cf7..cbd7d5f0 100644 --- a/sway/config/input.c +++ b/sway/config/input.c | |||
@@ -27,8 +27,8 @@ struct input_config *new_input_config(const char* identifier) { | |||
27 | input->natural_scroll = INT_MIN; | 27 | input->natural_scroll = INT_MIN; |
28 | input->accel_profile = INT_MIN; | 28 | input->accel_profile = INT_MIN; |
29 | input->pointer_accel = FLT_MIN; | 29 | input->pointer_accel = FLT_MIN; |
30 | input->scroll_method = INT_MIN; | ||
31 | input->scroll_button = INT_MIN; | 30 | input->scroll_button = INT_MIN; |
31 | input->scroll_method = INT_MIN; | ||
32 | input->left_handed = INT_MIN; | 32 | input->left_handed = INT_MIN; |
33 | input->repeat_delay = INT_MIN; | 33 | input->repeat_delay = INT_MIN; |
34 | input->repeat_rate = INT_MIN; | 34 | input->repeat_rate = INT_MIN; |
@@ -72,7 +72,7 @@ void merge_input_config(struct input_config *dst, struct input_config *src) { | |||
72 | dst->scroll_method = src->scroll_method; | 72 | dst->scroll_method = src->scroll_method; |
73 | } | 73 | } |
74 | if (src->scroll_button != INT_MIN) { | 74 | if (src->scroll_button != INT_MIN) { |
75 | dst->scroll_button= src->scroll_button; | 75 | dst->scroll_button = src->scroll_button; |
76 | } | 76 | } |
77 | if (src->send_events != INT_MIN) { | 77 | if (src->send_events != INT_MIN) { |
78 | dst->send_events = src->send_events; | 78 | dst->send_events = src->send_events; |