From 3ee0439ae508671ec9e5dc54b4a3e59105ad6972 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Sun, 3 May 2026 17:31:37 -0400 Subject: [PATCH] wayland: Pass the inverted flag for horizontal scroll events Natural scrolling affects both axes, and the compositor may not send the vertical axis orientation if the frame has no vertical scroll motion, so purely horizontal events need to be flagged as inverted as well. --- src/video/wayland/SDL_waylandevents.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index b974b7fe44..d2d492afbc 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -1207,9 +1207,7 @@ static void pointer_handle_axis_relative_direction(void *data, struct wl_pointer uint32_t axis, uint32_t axis_relative_direction) { SDL_WaylandSeat *seat = data; - if (axis != WL_POINTER_AXIS_VERTICAL_SCROLL) { - return; - } + switch (axis_relative_direction) { case WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL: seat->pointer.pending_frame.axis.direction = SDL_MOUSEWHEEL_NORMAL;