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.
This commit is contained in:
Tim Janik
1998-06-24 17:15:05 +00:00
committed by Tim Janik
parent 11f5588755
commit faa1434735
14 changed files with 184 additions and 37 deletions

View File

@ -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;