scrolledwindow: Do not round dx/dy to int
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 16 Apr 2015 20:45:54 +0000 (22:45 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 16 Apr 2015 20:45:54 +0000 (22:45 +0200)
Libinput will use 0.0f on the "scrolling finished" event, so check for this
instead of rounding (<1 values are sort of frequent on touchpads). This
impedes bug #745315 to resurface after commit d563b943ed3.

gtk/gtkscrolledwindow.c

index a5ceea81e01cb8b21f9f7d411c43c84c411514f6..9d073feee18ecb0392b475866b84567d9e241445 100644 (file)
@@ -1109,7 +1109,7 @@ captured_event_cb (GtkWidget *widget,
        */
       if (event->scroll.direction != GDK_SCROLL_SMOOTH ||
           (gdk_event_get_scroll_deltas (event, &dx, &dy) &&
-           ((int) dx != 0 || (int) dy != 0)))
+           (dx != 0 || dy != 0)))
         gtk_scrolled_window_cancel_deceleration (sw);
 
       return GDK_EVENT_PROPAGATE;