From 6eb3d98de0ef186f56fdec12772b83f319546cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 25 Oct 2016 16:52:27 +0200 Subject: [PATCH] csswidgetnode: Fix container condition for GtkInvisible ... which is a toplevel, but not a container. --- gtk/gtkcsswidgetnode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/gtkcsswidgetnode.c b/gtk/gtkcsswidgetnode.c index 3983e8384e..4e63c3f9a0 100644 --- a/gtk/gtkcsswidgetnode.c +++ b/gtk/gtkcsswidgetnode.c @@ -94,7 +94,8 @@ gtk_css_widget_node_queue_validate (GtkCssNode *node) { GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node); - if (widget_node->widget && _gtk_widget_is_toplevel (widget_node->widget)) + if (widget_node->widget && _gtk_widget_is_toplevel (widget_node->widget) && + GTK_IS_CONTAINER (widget_node->widget)) widget_node->validate_cb_id = gtk_widget_add_tick_callback (widget_node->widget, gtk_css_widget_node_queue_callback, node, @@ -106,7 +107,8 @@ gtk_css_widget_node_dequeue_validate (GtkCssNode *node) { GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node); - if (widget_node->widget && _gtk_widget_is_toplevel (widget_node->widget)) + if (widget_node->widget && _gtk_widget_is_toplevel (widget_node->widget) && + GTK_IS_CONTAINER (widget_node->widget)) gtk_widget_remove_tick_callback (widget_node->widget, widget_node->validate_cb_id); }