summaryrefslogtreecommitdiff
path: root/gtk/gtkscrolledwindow.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-04-16 22:45:54 +0200
committerCarlos Garnacho <carlosg@gnome.org>2015-04-16 22:45:54 +0200
commit4eb8157cfa9d74e5ad632117b7109fe39f972eb1 (patch)
treee6be408504979873c04f4f484eb6bd4e1ca3d1af /gtk/gtkscrolledwindow.c
parent6d19162c431fc40972165cf2a2d5e0c591ca696f (diff)
downloadgtk+-4eb8157cfa9d74e5ad632117b7109fe39f972eb1.tar.gz
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 d563b943ed3.
Diffstat (limited to 'gtk/gtkscrolledwindow.c')
-rw-r--r--gtk/gtkscrolledwindow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index a5ceea81e0..9d073feee1 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -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;