ソースを参照

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.

(cherry picked from commit 3ee0439ae508671ec9e5dc54b4a3e59105ad6972)
Frank Praznik 4 ヶ月 前
親
コミット
5c107908ff
1 ファイル変更、1 行追加、3 行削除
  1. 1 3
      src/video/wayland/SDL_waylandevents.c

+ 1 - 3
src/video/wayland/SDL_waylandevents.c

@@ -1169,9 +1169,7 @@ static void pointer_handle_axis_relative_direction(void *data, struct wl_pointer
                                                    uint32_t axis, uint32_t axis_relative_direction)
                                                    uint32_t axis, uint32_t axis_relative_direction)
 {
 {
     SDL_WaylandSeat *seat = data;
     SDL_WaylandSeat *seat = data;
-    if (axis != WL_POINTER_AXIS_VERTICAL_SCROLL) {
-        return;
-    }
+
     switch (axis_relative_direction) {
     switch (axis_relative_direction) {
     case WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL:
     case WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL:
         seat->pointer.pending_frame.axis.direction = SDL_MOUSEWHEEL_NORMAL;
         seat->pointer.pending_frame.axis.direction = SDL_MOUSEWHEEL_NORMAL;