From ebd7298594bc40d90180952cd0ca582e14796d41 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 23 Mar 2023 15:19:00 +1100 Subject: [PATCH] Cleanup: avoid repeating defaults for pointer scroll under Wayland --- intern/ghost/intern/GHOST_SystemWayland.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index 497ee56edf2..f44395b5bd5 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -2664,13 +2664,7 @@ static void pointer_handle_enter(void *data, /* Resetting scroll events is likely unnecessary, * do this to avoid any possible problems as it's harmless. */ - seat->pointer_scroll.smooth_xy[0] = 0; - seat->pointer_scroll.smooth_xy[1] = 0; - seat->pointer_scroll.discrete_xy[0] = 0; - seat->pointer_scroll.discrete_xy[1] = 0; - seat->pointer_scroll.inverted_xy[0] = false; - seat->pointer_scroll.inverted_xy[1] = false; - seat->pointer_scroll.axis_source = WL_POINTER_AXIS_SOURCE_WHEEL; + seat->pointer_scroll = GWL_SeatStatePointerScroll{}; seat->pointer.wl_surface_window = wl_surface;