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).
This commit is contained in:
Campbell Barton 2022-10-19 21:48:42 +11:00
parent ec638d3108
commit f0fba1a2d8
Notes: blender-bot 2023-03-16 03:33:45 +01:00
Referenced by issue #104272, Wayland: Inverted (natural) option ignored on (resolved upstream)
1 changed files with 5 additions and 4 deletions

View File

@ -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;