diff options
author | Tim Janik <timj@gtk.org> | 1998-06-24 17:15:05 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-06-24 17:15:05 +0000 |
commit | faa14347351f000690d85d07d0f580679b65e30f (patch) | |
tree | fd85231950d0b5e37f3c00107da4494964b1013a /gtk/gtkbox.c | |
parent | 11f55887557e07a3d29a547cdfa110ddb0b705b2 (diff) | |
download | gdk-pixbuf-faa14347351f000690d85d07d0f580679b65e30f.tar.gz |
do not avoid to queue for a resize if the container is not visible, we
Wed Jun 24 16:38:02 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_remove): do not avoid to queue for a resize
if the container is not visible, we might be a toplevel! this holds
for all other base container implementations as well, that are
candidates to derive toplevels from. in general the resizing code will
care about visibility itself.
* gtk/gtkmenushell.c (gtk_menu_shell_remove): likewise.
* gtk/gtkbox.c (gtk_box_remove): likewise.
* gtk/gtkwindow.c (gtk_window_move_resize): save ->use_uposition around
gtk_window_set_hints(), since we haven't calculated the new position
yet.
* gdk/gdkwindow.c (gdk_window_get_pointer): take care that *x, *y and
*mask are alway initialized in a sane way, regardless of the return
value.
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r-- | gtk/gtkbox.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 78e85b0e5..0b0b0a58f 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -711,16 +711,19 @@ gtk_box_remove (GtkContainer *container, if (child->widget == widget) { - gint visible; + gboolean was_visible; - visible = GTK_WIDGET_VISIBLE (widget); + was_visible = GTK_WIDGET_VISIBLE (widget); gtk_widget_unparent (widget); box->children = g_list_remove_link (box->children, children); g_list_free (children); g_free (child); - if (visible && GTK_WIDGET_VISIBLE (container)) + /* queue resize regardless of GTK_WIDGET_VISIBLE (container), + * since that's what is needed by toplevels. + */ + if (was_visible) gtk_widget_queue_resize (GTK_WIDGET (container)); break; |