From 08edaf4e76124a676e9457015e4451b05c355520 Mon Sep 17 00:00:00 2001 From: Robert Kubosz Date: Thu, 12 Jul 2018 12:08:53 +0200 Subject: [PATCH] increase maximum value of button identifier and also cleanup spaces --- sway/commands/input/scroll_button.c | 2 +- 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) { new_input_config(current_input_config->identifier); int scroll_button = atoi(argv[0]); - if (scroll_button < 1 || scroll_button > 10) { + if (scroll_button < 0 || scroll_button > 1000) { free_input_config(new_config); return cmd_results_new(CMD_INVALID, "scroll_button", "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) { input->natural_scroll = INT_MIN; input->accel_profile = INT_MIN; input->pointer_accel = FLT_MIN; - input->scroll_method = INT_MIN; input->scroll_button = INT_MIN; + input->scroll_method = INT_MIN; input->left_handed = INT_MIN; input->repeat_delay = INT_MIN; input->repeat_rate = INT_MIN; @@ -72,7 +72,7 @@ void merge_input_config(struct input_config *dst, struct input_config *src) { dst->scroll_method = src->scroll_method; } if (src->scroll_button != INT_MIN) { - dst->scroll_button= src->scroll_button; + dst->scroll_button = src->scroll_button; } if (src->send_events != INT_MIN) { dst->send_events = src->send_events;