aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-10 12:45:52 -0500
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-10 12:45:52 -0500
commit4e6bd53abf900020bbc38ceddb7b7505be4fb96d (patch)
treebe52327cbf9f415527143cfe36597f52fa0f9f63 /sway/input/cursor.c
parentMerge pull request #3400 from ianyfan/config-brace (diff)
downloadsway-4e6bd53abf900020bbc38ceddb7b7505be4fb96d.tar.gz
sway-4e6bd53abf900020bbc38ceddb7b7505be4fb96d.tar.zst
sway-4e6bd53abf900020bbc38ceddb7b7505be4fb96d.zip
input_cmd_scroll_button: utilize mouse btn helpers
This modifies `input_cmd_scroll_button` to utilize the mouse button helper `get_mouse_button` when parsing the button. x11 axis buttons are not supported with this command and `CMD_INVALID` will be returned, but all other x11 buttons, button event names, and button event codes should be working
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 9af7ef57..a69cccb4 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -1593,7 +1593,7 @@ uint32_t get_mouse_bindcode(const char *name, char **error) {
1593 1593
1594uint32_t get_mouse_button(const char *name, char **error) { 1594uint32_t get_mouse_button(const char *name, char **error) {
1595 uint32_t button = get_mouse_bindsym(name, error); 1595 uint32_t button = get_mouse_bindsym(name, error);
1596 if (!button && !error) { 1596 if (!button && !*error) {
1597 button = get_mouse_bindcode(name, error); 1597 button = get_mouse_bindcode(name, error);
1598 } 1598 }
1599 return button; 1599 return button;