mir: fix wheel scrolling in both directions
authorWilliam Hua <william.hua@canonical.com>
Mon, 22 Jun 2015 02:13:27 +0000 (22:13 -0400)
committerWilliam Hua <william.hua@canonical.com>
Tue, 23 Jun 2015 17:17:28 +0000 (13:17 -0400)
gdk/mir/gdkmireventsource.c

index 3fc7ed9bb7a9607b9ff4448b9776abf359e30d98..6fe31974fcc18ff1d29646f48dd8cba0b6cd9a97 100644 (file)
@@ -376,7 +376,7 @@ handle_motion_event (GdkWindow *window, const MirInputEvent *event)
           hscroll = mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_hscroll);
           vscroll = mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_vscroll);
 
-          if (hscroll > 0.5 || vscroll > 0.5)
+          if (ABS (hscroll) > 0.5 || ABS (vscroll) > 0.5)
             generate_scroll_event (window, x, y, hscroll, vscroll, modifier_state, event_time);
           if (ABS (new_x - x) > 0.5 || ABS (new_y - y) > 0.5)
             {