backend/libinput: handle high-res scroll events

Receive high-resolution scroll events from libinput and emit the
appropiate wlr_pointer signal.
This commit is contained in:
José Expósito 2021-09-20 19:47:03 +02:00
parent 763cf1915b
commit d18b85c88a
3 changed files with 65 additions and 0 deletions

View file

@ -262,6 +262,20 @@ void handle_libinput_event(struct wlr_libinput_backend *backend,
handle_pointer_axis(event, libinput_dev);
#endif
break;
#if LIBINPUT_HAS_SCROLL_VALUE120
case LIBINPUT_EVENT_POINTER_SCROLL_WHEEL:
handle_pointer_axis_value120(event, libinput_dev,
WLR_AXIS_SOURCE_WHEEL);
break;
case LIBINPUT_EVENT_POINTER_SCROLL_FINGER:
handle_pointer_axis_value120(event, libinput_dev,
WLR_AXIS_SOURCE_FINGER);
break;
case LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS:
handle_pointer_axis_value120(event, libinput_dev,
WLR_AXIS_SOURCE_CONTINUOUS);
break;
#endif
case LIBINPUT_EVENT_TOUCH_DOWN:
handle_touch_down(event, libinput_dev);
break;