diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 38b54ec8f3..92bc911ff9 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -1266,6 +1266,7 @@ gtk_stack_add (GtkContainer *container, priv->children = g_list_append (priv->children, child_info); + gtk_widget_set_child_visible (child, FALSE); gtk_widget_set_parent_window (child, priv->bin_window); gtk_widget_set_parent (child, GTK_WIDGET (stack)); @@ -1282,8 +1283,6 @@ gtk_stack_add (GtkContainer *container, if (priv->visible_child == NULL && gtk_widget_get_visible (child)) set_visible_child (stack, child_info, priv->transition_type, priv->transition_duration); - else - gtk_widget_set_child_visible (child, FALSE); if (priv->hhomogeneous || priv->vhomogeneous || priv->visible_child == child_info) gtk_widget_queue_resize (GTK_WIDGET (stack));