mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
backend/wayland: handle high-res scroll events
Receive high-resolution scroll events from the parent compositor using a Wayland listiner and emit the appropiate wlr_pointer signal.
This commit is contained in:
parent
e00f042f80
commit
11f49b6b6a
2 changed files with 20 additions and 1 deletions
|
|
@ -187,6 +187,17 @@ static void pointer_handle_axis_discrete(void *data,
|
|||
pointer->axis_discrete = discrete * WLR_POINTER_AXIS_DISCRETE_STEP;
|
||||
}
|
||||
|
||||
static void pointer_handle_axis_value120(void *data,
|
||||
struct wl_pointer *wl_pointer, uint32_t axis, int32_t value120) {
|
||||
struct wlr_wl_seat *seat = data;
|
||||
struct wlr_wl_pointer *pointer = seat->active_pointer;
|
||||
if (pointer == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
pointer->axis_discrete = value120;
|
||||
}
|
||||
|
||||
static const struct wl_pointer_listener pointer_listener = {
|
||||
.enter = pointer_handle_enter,
|
||||
.leave = pointer_handle_leave,
|
||||
|
|
@ -197,6 +208,7 @@ static const struct wl_pointer_listener pointer_listener = {
|
|||
.axis_source = pointer_handle_axis_source,
|
||||
.axis_stop = pointer_handle_axis_stop,
|
||||
.axis_discrete = pointer_handle_axis_discrete,
|
||||
.axis_value120 = pointer_handle_axis_value120,
|
||||
};
|
||||
|
||||
static void gesture_swipe_begin(void *data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue