Always set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,

Tue Apr  9 18:34:58 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
        set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
        even if we aren't currently in a resize container... we need
        this to properly handle size changes to widgets that are
        being moved from one heirarchy to another. (#78226)
This commit is contained in:
Owen Taylor 2002-04-09 22:41:37 +00:00 committed by Owen Taylor
parent 64e33eb68f
commit eb721363be
7 changed files with 61 additions and 12 deletions

View File

@ -1,3 +1,11 @@
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
even if we aren't currently in a resize container... we need
this to properly handle size changes to widgets that are
being moved from one heirarchy to another. (#78226)
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org> Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
Fixes #78110 Fixes #78110

View File

@ -1,3 +1,11 @@
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
even if we aren't currently in a resize container... we need
this to properly handle size changes to widgets that are
being moved from one heirarchy to another. (#78226)
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org> Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
Fixes #78110 Fixes #78110

View File

@ -1,3 +1,11 @@
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
even if we aren't currently in a resize container... we need
this to properly handle size changes to widgets that are
being moved from one heirarchy to another. (#78226)
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org> Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
Fixes #78110 Fixes #78110

View File

@ -1,3 +1,11 @@
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
even if we aren't currently in a resize container... we need
this to properly handle size changes to widgets that are
being moved from one heirarchy to another. (#78226)
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org> Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
Fixes #78110 Fixes #78110

View File

@ -1,3 +1,11 @@
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
even if we aren't currently in a resize container... we need
this to properly handle size changes to widgets that are
being moved from one heirarchy to another. (#78226)
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org> Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
Fixes #78110 Fixes #78110

View File

@ -1,3 +1,11 @@
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
even if we aren't currently in a resize container... we need
this to properly handle size changes to widgets that are
being moved from one heirarchy to another. (#78226)
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org> Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
Fixes #78110 Fixes #78110

View File

@ -1012,25 +1012,26 @@ void
_gtk_container_queue_resize (GtkContainer *container) _gtk_container_queue_resize (GtkContainer *container)
{ {
GtkContainer *resize_container; GtkContainer *resize_container;
GtkWidget *widget;
g_return_if_fail (GTK_IS_CONTAINER (container)); g_return_if_fail (GTK_IS_CONTAINER (container));
widget = GTK_WIDGET (container);
resize_container = gtk_container_get_resize_container (container); resize_container = gtk_container_get_resize_container (container);
if (resize_container)
{
GtkWidget *widget = GTK_WIDGET (container);
while (!GTK_WIDGET_ALLOC_NEEDED (widget) || !GTK_WIDGET_REQUEST_NEEDED (widget)) while (!GTK_WIDGET_ALLOC_NEEDED (widget) || !GTK_WIDGET_REQUEST_NEEDED (widget))
{ {
GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED); GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
GTK_PRIVATE_SET_FLAG (widget, GTK_REQUEST_NEEDED); GTK_PRIVATE_SET_FLAG (widget, GTK_REQUEST_NEEDED);
if (widget == GTK_WIDGET (resize_container)) if ((resize_container && widget == GTK_WIDGET (resize_container)) ||
!widget->parent)
break; break;
widget = widget->parent; widget = widget->parent;
} }
if (resize_container)
{
if (GTK_WIDGET_VISIBLE (resize_container) && if (GTK_WIDGET_VISIBLE (resize_container) &&
(GTK_WIDGET_TOPLEVEL (resize_container) || GTK_WIDGET_REALIZED (resize_container))) (GTK_WIDGET_TOPLEVEL (resize_container) || GTK_WIDGET_REALIZED (resize_container)))
{ {