mirror of
https://github.com/swaywm/sway.git
synced 2025-11-14 06:59:47 -05:00
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
This commit is contained in:
parent
212baf2f75
commit
4e6bd53abf
3 changed files with 24 additions and 21 deletions
|
|
@ -1593,7 +1593,7 @@ uint32_t get_mouse_bindcode(const char *name, char **error) {
|
|||
|
||||
uint32_t get_mouse_button(const char *name, char **error) {
|
||||
uint32_t button = get_mouse_bindsym(name, error);
|
||||
if (!button && !error) {
|
||||
if (!button && !*error) {
|
||||
button = get_mouse_bindcode(name, error);
|
||||
}
|
||||
return button;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue