[gtk/gtk-4-6: 2/3] treeview: Do not set top row adjustment value while animating




commit 65f51d2d16e33ba606ee63fcb6ca8a078e01d96f
Author: Mat <mail mathias is>
Date:   Wed Aug 10 08:26:02 2022 +0300

    treeview: Do not set top row adjustment value while animating
    
    gtk_tree_view_top_row_to_dy, which is called from GtkTreeView's
    size_allocate function, changes the adjustment value. Since this
    conflicts with the animation when changing the active row, bail
    out until the animation is finished.
    
    Fixes #4550

 gtk/gtktreeview.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 4417ca20c6..ffecf16b3b 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -6527,6 +6527,9 @@ gtk_tree_view_top_row_to_dy (GtkTreeView *tree_view)
   if (priv->in_top_row_to_dy)
     return;
 
+  if (gtk_adjustment_is_animating (priv->vadjustment))
+    return;
+
   if (priv->top_row)
     path = gtk_tree_row_reference_get_path (priv->top_row);
   else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]