[gtk/wip/carlosg/scrolledwindow-warning] gtkscrolledwindow: Do not try to doubly trigger deceleration
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/scrolledwindow-warning] gtkscrolledwindow: Do not try to doubly trigger deceleration
- Date: Mon, 28 Feb 2022 19:31:09 +0000 (UTC)
commit 33db142eab6978b10ec6d668cebdbd88dca8d723
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Feb 28 20:27:43 2022 +0100
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
gtk/gtkscrolledwindow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 1842dcd528..4879fee68d 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1052,7 +1052,8 @@ gtk_scrolled_window_decelerate (GtkScrolledWindow *scrolled_window,
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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]