[gtk/otte/for-master: 1/2] stylecontext: Remove excess gtk_css_node_invalidate() call
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/otte/for-master: 1/2] stylecontext: Remove excess gtk_css_node_invalidate() call
- Date: Tue, 21 Jan 2020 13:51:49 +0000 (UTC)
commit e6a0a2f5877083e9b726e4f5edf96531ff23c061
Author: Benjamin Otte <otte redhat com>
Date: Tue Jan 21 14:43:31 2020 +0100
stylecontext: Remove excess gtk_css_node_invalidate() call
This call is not necessary, because gtk_css_node_set_parent() does the
right thing. (It probably hasn't been necessary for years, but I'm
not gonna try my luck on GTK3 at this stage.)
This code is usually called the first time
gtk_widget_get_style_context() is called on a widget and its style
context gets create. At that point however, the css nodes are in the
right place already, so no invalidation should happen.
gtk/gtkstylecontext.c | 1 -
1 file changed, 1 deletion(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 7e7deabb9a..717dce8437 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1035,7 +1035,6 @@ gtk_style_context_set_parent (GtkStyleContext *context,
priv->parent = parent;
g_object_notify_by_pspec (G_OBJECT (context), properties[PROP_PARENT]);
- gtk_css_node_invalidate (gtk_style_context_get_root (context), GTK_CSS_CHANGE_ANY_PARENT |
GTK_CSS_CHANGE_ANY_SIBLING);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]