[Bf-blender-cvs] [760a6aa1f5d] master: Fix error in 30d9a6245f892492188318e92b85083ef8b301f2

Campbell Barton noreply at git.blender.org
Wed Oct 19 07:36:33 CEST 2022


Commit: 760a6aa1f5d67d9638e44748dfd453729634b331
Author: Campbell Barton
Date:   Wed Oct 19 16:35:32 2022 +1100
Branches: master
https://developer.blender.org/rB760a6aa1f5d67d9638e44748dfd453729634b331

Fix error in 30d9a6245f892492188318e92b85083ef8b301f2

X/Y for mouse wheel events was unintentionally flipped.

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

M	intern/ghost/intern/GHOST_SystemWayland.cpp

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

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 09f51199047..62f96e4e620 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -1904,11 +1904,11 @@ static void pointer_handle_frame(void *data, struct wl_pointer * /*wl_pointer*/)
     seat->pointer.scroll_xy[1] = 0;
   }
 
-  /* Discrete Y steps currently unsupported. */
-  if (seat->pointer.scroll_discrete_xy[0]) {
+  /* Discrete X axis currently unsupported. */
+  if (seat->pointer.scroll_discrete_xy[1]) {
     if (wl_surface *wl_surface_focus = seat->pointer.wl_surface) {
       GHOST_WindowWayland *win = ghost_wl_surface_user_data(wl_surface_focus);
-      const int32_t discrete = seat->pointer.scroll_discrete_xy[0];
+      const int32_t discrete = seat->pointer.scroll_discrete_xy[1];
       seat->system->pushEvent(new GHOST_EventWheel(
           seat->system->getMilliSeconds(), win, std::signbit(discrete) ? +1 : -1));
     }



More information about the Bf-blender-cvs mailing list