mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-04 07:10:15 +02:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user