cssnode: Don't queue_validate/deque_validate invisible nodes

Otherwise setting/unsetting the parrent may cause on an invisible widget
may cause the style to be continuously updated.

Fixes: #2849
This commit is contained in:
Benjamin Berg 2020-06-15 21:15:58 +02:00
parent 40fc27fd55
commit 7a5caf1bc0

View File

@ -706,14 +706,14 @@ gtk_css_node_get_timestamp (GtkCssNode *cssnode)
static void
gtk_css_node_parent_was_unset (GtkCssNode *node)
{
if (node->invalid)
if (node->visible && node->invalid)
GTK_CSS_NODE_GET_CLASS (node)->queue_validate (node);
}
static void
gtk_css_node_parent_will_be_set (GtkCssNode *node)
{
if (node->invalid)
if (node->visible && node->invalid)
GTK_CSS_NODE_GET_CLASS (node)->dequeue_validate (node);
}