From 763cf1915bf3ab8120cb20ff50314207559c01e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Mon, 20 Sep 2021 19:46:53 +0200 Subject: [PATCH] backend/libinput: ignore low-res scroll events On newer versions of libinput, the event LIBINPUT_EVENT_POINTER_AXIS has been deprecated in favour of LIBINPUT_EVENT_POINTER_SCROLL_WHEEL, LIBINPUT_EVENT_POINTER_SCROLL_FINGER and LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS. Where new events are provided by the backend, ignore LIBINPUT_EVENT_POINTER_AXIS. --- backend/libinput/events.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/libinput/events.c b/backend/libinput/events.c index f149b2f1e..66773a814 100644 --- a/backend/libinput/events.c +++ b/backend/libinput/events.c @@ -257,7 +257,10 @@ void handle_libinput_event(struct wlr_libinput_backend *backend, handle_pointer_button(event, libinput_dev); break; case LIBINPUT_EVENT_POINTER_AXIS: +#if !LIBINPUT_HAS_SCROLL_VALUE120 + /* This event must be ignored in favour of the SCROLL_* events */ handle_pointer_axis(event, libinput_dev); +#endif break; case LIBINPUT_EVENT_TOUCH_DOWN: handle_touch_down(event, libinput_dev);