[gtk+] mir: fix wheel scrolling in both directions



commit e083eb42e916dbd2f75e213956a4e513e892d165
Author: William Hua <william hua canonical com>
Date:   Sun Jun 21 22:13:27 2015 -0400

    mir: fix wheel scrolling in both directions

 gdk/mir/gdkmireventsource.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/mir/gdkmireventsource.c b/gdk/mir/gdkmireventsource.c
index 3fc7ed9..6fe3197 100644
--- a/gdk/mir/gdkmireventsource.c
+++ b/gdk/mir/gdkmireventsource.c
@@ -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)
             {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]