[gtk+] scrolledwindow: Do not round dx/dy to int
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scrolledwindow: Do not round dx/dy to int
- Date: Thu, 16 Apr 2015 20:55:07 +0000 (UTC)
commit 4eb8157cfa9d74e5ad632117b7109fe39f972eb1
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Apr 16 22:45:54 2015 +0200
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.
gtk/gtkscrolledwindow.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index a5ceea8..9d073fe 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]