mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
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:
parent
6d19162c43
commit
4eb8157cfa
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user