Add onbutton scrollMethod, scrollButton

This commit is contained in:
diniamo 2026-04-25 20:44:02 +02:00 committed by Johan Malm
parent 7d264c907f
commit 5c7bfe3c67
6 changed files with 33 additions and 4 deletions

View file

@ -328,6 +328,16 @@ configure_libinput(struct wlr_input_device *wlr_input_device)
libinput_device_config_scroll_set_method(libinput_dev, dc->scroll_method);
}
libinput_device_config_scroll_set_button(libinput_dev,
libinput_device_config_scroll_get_default_button(libinput_dev));
if (dc->scroll_button < 0) {
wlr_log(WLR_INFO, "scroll button not configured");
} else {
wlr_log(WLR_INFO, "scroll button configured (%d)",
dc->scroll_button);
libinput_device_config_scroll_set_button(libinput_dev, dc->scroll_button);
}
libinput_device_config_send_events_set_mode(libinput_dev,
libinput_device_config_send_events_get_default_mode(libinput_dev));
if ((dc->send_events_mode != LIBINPUT_CONFIG_SEND_EVENTS_ENABLED