scrolledwindow: Do not round dx/dy to int

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 d563b943ed.
This commit is contained in:
Carlos Garnacho 2015-04-16 22:45:54 +02:00
parent 6d19162c43
commit 4eb8157cfa

View 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;