forked from AuroraMiddleware/gtk
gtkscrolledwindow: Do not try to doubly trigger deceleration
This may come from different sources at around the same time, e.g. a hold gesture while on overshoot. Avoid doing that if an animation is already set. Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4730
This commit is contained in:
parent
68319afd23
commit
33db142eab
@ -1052,7 +1052,8 @@ gtk_scrolled_window_decelerate (GtkScrolledWindow *scrolled_window,
|
|||||||
|
|
||||||
if (priv->x_velocity != 0 || priv->y_velocity != 0 || overshoot)
|
if (priv->x_velocity != 0 || priv->y_velocity != 0 || overshoot)
|
||||||
{
|
{
|
||||||
gtk_scrolled_window_start_deceleration (scrolled_window);
|
if (priv->deceleration_id == 0)
|
||||||
|
gtk_scrolled_window_start_deceleration (scrolled_window);
|
||||||
priv->x_velocity = priv->y_velocity = 0;
|
priv->x_velocity = priv->y_velocity = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user