mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
wayland: fix the direction of scrolling
Fix the direction of scrolling and convert the delta values into the expected range. https://bugzilla.gnome.org/show_bug.cgi?id=693251
This commit is contained in:
parent
1568204159
commit
69ac91b4b3
@ -718,13 +718,14 @@ pointer_handle_axis (void *data,
|
||||
GdkEvent *event;
|
||||
gdouble delta_x, delta_y;
|
||||
|
||||
/* get the delta and convert it into the expected range */
|
||||
switch (axis) {
|
||||
case WL_POINTER_AXIS_VERTICAL_SCROLL:
|
||||
delta_x = 0;
|
||||
delta_y = -wl_fixed_to_double (value);
|
||||
delta_y = wl_fixed_to_double (value) / 10.0;
|
||||
break;
|
||||
case WL_POINTER_AXIS_HORIZONTAL_SCROLL:
|
||||
delta_x = -wl_fixed_to_double (value);
|
||||
delta_x = wl_fixed_to_double (value) / 10.0;
|
||||
delta_y = 0;
|
||||
default:
|
||||
g_return_if_reached ();
|
||||
|
Loading…
Reference in New Issue
Block a user