diff options
author | Thomas Wood <thomas.wood@intel.com> | 2013-02-05 17:00:10 +0000 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2013-02-06 16:56:43 +0000 |
commit | 69ac91b4b3b035f92b6d10944fb125e16ca3b062 (patch) | |
tree | 26389a705ff1139f3409745bcc5dd9e83a210c30 | |
parent | 1568204159f8df48aa7a988ed99c4df6eb2c5ee5 (diff) | |
download | gtk+-69ac91b4b3b035f92b6d10944fb125e16ca3b062.tar.gz |
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
-rw-r--r-- | gdk/wayland/gdkdevice-wayland.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 69f48b6742..bb4ef0bebf 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -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 (); |