[gtk/wip/otte/for-master: 1/8] widget: Always update the CSS node




commit efa7f4bafb0ed3709b4e93841ecab3d11d1e36f6
Author: Benjamin Otte <otte redhat com>
Date:   Tue Oct 20 01:50:12 2020 +0200

    widget: Always update the CSS node
    
    Anybody who keeps their own CSS nodes around or wants to order CSS nodes
    different from widgets will from now on have to do it manually all the
    time.
    
    This is outdated behavior, nobody should be doing either of those two
    things.
    
    Also, the correct case is much more common, and not doing it
    automatically was causing bugs.
    
    Fixes #3280

 gtk/gtkwidget.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 29f595c55a..014772acb2 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5741,12 +5741,9 @@ gtk_widget_reposition_after (GtkWidget *widget,
   data.flags_to_unset = 0;
   gtk_widget_propagate_state (widget, &data);
 
-  if (gtk_css_node_get_parent (priv->cssnode) == NULL)
-    {
-      gtk_css_node_insert_after (parent->priv->cssnode,
-                                 priv->cssnode,
-                                 previous_sibling ? previous_sibling->priv->cssnode : NULL);
-    }
+  gtk_css_node_insert_after (parent->priv->cssnode,
+                             priv->cssnode,
+                             previous_sibling ? previous_sibling->priv->cssnode : NULL);
 
   _gtk_widget_update_parent_muxer (widget);
 


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