Commit: f0fba1a2d8deb7e92ccb217361a378f8fcc29d9b
Author: Campbell Barton
Date:   Wed Oct 19 21:48:42 2022 +1100
Branches: master
https://developer.blender.org/rBf0fba1a2d8deb7e92ccb217361a378f8fcc29d9b

GHOST/Wayland: invert touch-pad scrolling

This should use the system preference for scroll direction eventually,
for now default to a down-motion scrolling down (matching GTK & QT).

===================================================================

M       intern/ghost/intern/GHOST_SystemWayland.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp 
b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 37049e646bd..9f018d039b1 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -1945,11 +1945,12 @@ static void pointer_handle_frame(void *data, struct 
wl_pointer * /*wl_pointer*/)
           GHOST_kTrackpadEventScroll,
           wl_fixed_to_int(scale * seat->pointer.xy[0]),
           wl_fixed_to_int(scale * seat->pointer.xy[1]),
-          /* NOTE: scaling the delta doesn't seem necessary. */
-          wl_fixed_to_int(seat->pointer_scroll.smooth_xy[0]),
-          wl_fixed_to_int(seat->pointer_scroll.smooth_xy[1]),
+          /* NOTE: scaling the delta doesn't seem necessary.
+           * NOTE: inverting delta gives correct results, see: QTBUG-85767. */
+          -wl_fixed_to_int(seat->pointer_scroll.smooth_xy[0]),
+          -wl_fixed_to_int(seat->pointer_scroll.smooth_xy[1]),
           /* TODO: investigate a way to request this configuration from the 
system. */
-          true));
+          false));
     }
 
     seat->pointer_scroll.smooth_xy[0] = 0;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to