]> Pileus Git - ~andy/gtk/commitdiff
wayland: fix the direction of scrolling
authorThomas Wood <thomas.wood@intel.com>
Tue, 5 Feb 2013 17:00:10 +0000 (17:00 +0000)
committerThomas Wood <thomas.wood@intel.com>
Wed, 6 Feb 2013 16:56:43 +0000 (16:56 +0000)
Fix the direction of scrolling and convert the delta values into the
expected range.

https://bugzilla.gnome.org/show_bug.cgi?id=693251

gdk/wayland/gdkdevice-wayland.c

index 69f48b6742c5b0bcaf2f83d6544c63e1e90a1afd..bb4ef0bebf1e9c62a5f1376bec860fa5e0feee60 100644 (file)
@@ -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 ();