[gtk/gtk-4-6] gtkscrolledwindow: Do not try to doubly trigger deceleration
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-6] gtkscrolledwindow: Do not try to doubly trigger deceleration
- Date: Wed, 16 Mar 2022 02:20:17 +0000 (UTC)
commit 3764b27babc1cf94f27dfe2079426846d53d0256
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 49be97080c..ee8c2b0ba4 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]