[PATCH 0/1] MR9846: winewayland: support wl_seat version 8
Bump wl_seat from version 5 to version 8 to support the axis_value120 event, required for high resolution scrolling. - Changes in version 5->6: adding the `shape` and `orientation` events to `wl_touch`. We do not create `wl_touch` objects, so no changes are needed. - Changes in version 6->7: wl_keyboard.keymap must be mmap'd with MAP_PRIVATE (MAP_SHARED is no longer allowed). We already do so, so no changes are needed. - Changes in version 7->8: addition of the wl_pointer.axis_value120 event. Implementing it is the purpose of this MR. This is my first Wine MR. Please let me know if there's anything I can do better! -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9846
From: Ashley Hauck <22095-khyperia@users.noreply.gitlab.winehq.org> --- dlls/winewayland.drv/wayland.c | 2 +- dlls/winewayland.drv/wayland_pointer.c | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dlls/winewayland.drv/wayland.c b/dlls/winewayland.drv/wayland.c index acc340d98c7..b164210adf0 100644 --- a/dlls/winewayland.drv/wayland.c +++ b/dlls/winewayland.drv/wayland.c @@ -141,7 +141,7 @@ static void registry_handle_global(void *data, struct wl_registry *registry, } pthread_mutex_lock(&seat->mutex); seat->wl_seat = wl_registry_bind(registry, id, &wl_seat_interface, - version < 5 ? version : 5); + version < 8 ? version : 8); seat->global_id = id; wl_seat_add_listener(seat->wl_seat, &seat_listener, NULL); pthread_mutex_unlock(&seat->mutex); diff --git a/dlls/winewayland.drv/wayland_pointer.c b/dlls/winewayland.drv/wayland_pointer.c index c4fdb33a766..f7e1b5c1a82 100644 --- a/dlls/winewayland.drv/wayland_pointer.c +++ b/dlls/winewayland.drv/wayland_pointer.c @@ -291,8 +291,8 @@ static void pointer_handle_axis_stop(void *data, struct wl_pointer *wl_pointer, { } -static void pointer_handle_axis_discrete(void *data, struct wl_pointer *wl_pointer, - uint32_t axis, int32_t discrete) +static void pointer_handle_axis_value120(void *data, struct wl_pointer *wl_pointer, + uint32_t axis, int32_t value120) { INPUT input = {0}; HWND hwnd; @@ -305,20 +305,26 @@ static void pointer_handle_axis_discrete(void *data, struct wl_pointer *wl_point { case WL_POINTER_AXIS_VERTICAL_SCROLL: input.mi.dwFlags = MOUSEEVENTF_WHEEL; - input.mi.mouseData = -WHEEL_DELTA * discrete; + input.mi.mouseData = -value120; break; case WL_POINTER_AXIS_HORIZONTAL_SCROLL: input.mi.dwFlags = MOUSEEVENTF_HWHEEL; - input.mi.mouseData = WHEEL_DELTA * discrete; + input.mi.mouseData = value120; break; default: break; } - TRACE("hwnd=%p axis=%u discrete=%d\n", hwnd, axis, discrete); + TRACE("hwnd=%p axis=%u value120=%d\n", hwnd, axis, value120); NtUserSendHardwareInput(hwnd, 0, &input, 0); } +static void pointer_handle_axis_discrete(void *data, struct wl_pointer *wl_pointer, + uint32_t axis, int32_t discrete) +{ + pointer_handle_axis_value120(data, wl_pointer, axis, WHEEL_DELTA * discrete); +} + static const struct wl_pointer_listener pointer_listener = { pointer_handle_enter, @@ -329,7 +335,8 @@ static const struct wl_pointer_listener pointer_listener = pointer_handle_frame, pointer_handle_axis_source, pointer_handle_axis_stop, - pointer_handle_axis_discrete + pointer_handle_axis_discrete, + pointer_handle_axis_value120 }; /********************************************************************** -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9846
Hmm. There's some CI failures, but they seem to be unrelated - for example, https://gitlab.winehq.org/wine/wine/-/merge_requests/9841 has the exact same failures. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9846#note_126333
On Thu Jan 1 16:15:14 2026 +0000, Ashley Hauck wrote:
Hmm. There's some CI failures, but they seem to be unrelated - for example, https://gitlab.winehq.org/wine/wine/-/merge_requests/9841 has the exact same failures. Yeah, we have a couple of flaky tests. Ignore them.
Though I agree they're annoying. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9846#note_126335
participants (3)
-
Alfred Agrell (@Alcaro) -
Ashley Hauck -
Ashley Hauck (@khyperia)