diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 4f23ece952..91a155a8d1 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -322,7 +322,6 @@ static gboolean gtk_container_focus_move (GtkContainer *container GtkDirectionType direction); static void gtk_container_children_callback (GtkWidget *widget, gpointer client_data); -static void gtk_container_show_all (GtkWidget *widget); static gint gtk_container_draw (GtkWidget *widget, cairo_t *cr); static void gtk_container_snapshot (GtkWidget *widget, @@ -463,7 +462,6 @@ gtk_container_class_init (GtkContainerClass *class) widget_class->destroy = gtk_container_destroy; widget_class->compute_expand = gtk_container_compute_expand; - widget_class->show_all = gtk_container_show_all; widget_class->snapshot = gtk_container_snapshot; widget_class->draw = gtk_container_draw; widget_class->map = gtk_container_map; @@ -2991,18 +2989,6 @@ gtk_container_get_focus_hadjustment (GtkContainer *container) return hadjustment; } - -static void -gtk_container_show_all (GtkWidget *widget) -{ - g_return_if_fail (GTK_IS_CONTAINER (widget)); - - gtk_container_foreach (GTK_CONTAINER (widget), - (GtkCallback) gtk_widget_show_all, - NULL); - gtk_widget_show (widget); -} - typedef struct { GtkWidget *child; int window_depth; diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 2f46a78daa..ea9380e5bc 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -944,6 +944,22 @@ gtk_widget_real_snapshot (GtkWidget *widget, /* nothing to do here */ } +static void +gtk_widget_real_show_all (GtkWidget *widget) +{ + GtkWidget *p; + + for (p = gtk_widget_get_first_child (widget); + p != NULL; + p = gtk_widget_get_next_sibling (p)) + { + if (!GTK_IS_POPOVER (p)) + gtk_widget_show_all (p); + } + + gtk_widget_show (widget); +} + static void gtk_widget_class_init (GtkWidgetClass *klass) { @@ -992,7 +1008,7 @@ gtk_widget_class_init (GtkWidgetClass *klass) klass->activate_signal = 0; klass->dispatch_child_properties_changed = gtk_widget_dispatch_child_properties_changed; klass->show = gtk_widget_real_show; - klass->show_all = gtk_widget_show; + klass->show_all = gtk_widget_real_show_all; klass->hide = gtk_widget_real_hide; klass->map = gtk_widget_real_map; klass->unmap = gtk_widget_real_unmap;