mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-02 09:01:43 -05:00
feat: add libinput scroll_button
This MR adds a option to set a button for when scroll_on_button_down is enabled as the scroll method. The user can define a different button to the enable the scroll event. By default the middle mouse button (274) is used, but with the `scroll_button` setting any other mouse button can be set, like the right mouse button (273) or a lateral button like back and forward buttons.
This commit is contained in:
parent
7c175051b7
commit
d1bea3ae34
3 changed files with 9 additions and 0 deletions
|
|
@ -3940,6 +3940,9 @@ void createpointer(struct wlr_pointer *pointer) {
|
|||
if (libinput_device_config_scroll_get_methods(device) !=
|
||||
LIBINPUT_CONFIG_SCROLL_NO_SCROLL)
|
||||
libinput_device_config_scroll_set_method(device, scroll_method);
|
||||
if (libinput_device_config_scroll_get_methods(device) ==
|
||||
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN)
|
||||
libinput_device_config_scroll_set_button(device, scroll_button);
|
||||
|
||||
if (libinput_device_config_click_get_methods(device) !=
|
||||
LIBINPUT_CONFIG_CLICK_METHOD_NONE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue