mirror of
https://github.com/labwc/labwc.git
synced 2026-02-13 04:27:49 -05:00
Add scroll method libinput option
<libinput>
<device>
<scrollMethod>none|twofinger|edge</scrollMethod>
</device>
</libinput>
Fixes: #2766
This commit is contained in:
parent
8ba14891fa
commit
fdab272bdc
6 changed files with 41 additions and 0 deletions
11
src/seat.c
11
src/seat.c
|
|
@ -233,6 +233,17 @@ configure_libinput(struct wlr_input_device *wlr_input_device)
|
|||
libinput_device_config_click_set_method(libinput_dev, dc->click_method);
|
||||
}
|
||||
|
||||
if (dc->scroll_method < 0) {
|
||||
wlr_log(WLR_INFO, "scroll method not configured");
|
||||
} else if (dc->scroll_method != LIBINPUT_CONFIG_SCROLL_NO_SCROLL
|
||||
&& (libinput_device_config_scroll_get_methods(libinput_dev)
|
||||
& dc->scroll_method) == 0) {
|
||||
wlr_log(WLR_INFO, "scroll method not supported");
|
||||
} else {
|
||||
wlr_log(WLR_INFO, "scroll method configured");
|
||||
libinput_device_config_scroll_set_method(libinput_dev, dc->scroll_method);
|
||||
}
|
||||
|
||||
if ((dc->send_events_mode != LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
|
||||
&& (libinput_device_config_send_events_get_modes(libinput_dev)
|
||||
& dc->send_events_mode) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue