summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1998-04-23 04:26:20 +0000
committerArturo Espinosa <unammx@src.gnome.org>1998-04-23 04:26:20 +0000
commit9546a9dc14051aba0c1f63166cf91a709aec0136 (patch)
tree0736ef0f2cb5fd017d41c7e8844694b4ce6a331e /gtk
parentf83adda582cb9d20dd2c9d44881f09102bd0e5bc (diff)
downloadgdk-pixbuf-9546a9dc14051aba0c1f63166cf91a709aec0136.tar.gz
Remember whether the widget was visible before we unparent it.
1998-04-22 Federico Mena Quintero <federico@nuclecu.unam.mx> * gtk/gtkbin.c (gtk_bin_remove): Remember whether the widget was visible before we unparent it.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkbin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index 87e37b98c..4e7b56e14 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -237,10 +237,12 @@ gtk_bin_remove (GtkContainer *container,
if (bin->child == widget)
{
+ gboolean widget_was_visible = GTK_WIDGET_VISIBLE (widget);
+
gtk_widget_unparent (widget);
bin->child = NULL;
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
+ if (widget_was_visible && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (GTK_WIDGET (container));
}
}