Merge branch 'wip/exalm/kinetic_scrolling' into 'master'

eventcontrollerscroll: Fix the history push condition

See merge request GNOME/gtk!1902
This commit is contained in:
Matthias Clasen 2020-05-14 22:40:54 +00:00
commit 3df0f95ee3

View File

@ -329,12 +329,11 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller,
}
if (dx != 0 || dy != 0)
{
g_signal_emit (controller, signals[SCROLL], 0, dx, dy, &handled);
g_signal_emit (controller, signals[SCROLL], 0, dx, dy, &handled);
if (scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_KINETIC)
scroll_history_push (scroll, dx, dy, gdk_event_get_time (event));
}
if (direction == GDK_SCROLL_SMOOTH &&
scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_KINETIC)
scroll_history_push (scroll, dx, dy, gdk_event_get_time (event));
if (scroll->active && gdk_scroll_event_is_stop (event))
{