Reset alloc_needed_on_child *before* allocating the children. This is
because some child's size_allocate() may call queue_allocate(), which
will bubble up alloc_needed_on_child. An example of this happening is
with GtkScrollable implementations, which are supposed to configure
their adjustments in size_allocate(), which will cause GtkScrollbar's
GtkRange to notice and queue_allocate() on itself.
If we reset alloc_needed_on_child after this happens, then our children
will have a lingering alloc_needed_on_child and will not receive an
allocation.
This commit fixes widgets occasionally losing an allocation when this
scenario happens.
priv->height = adjusted.height;
priv->baseline = baseline;
+ priv->alloc_needed_on_child = FALSE;
+
if (priv->layout_manager != NULL)
{
gtk_layout_manager_allocate (priv->layout_manager, widget,
gtk_widget_ensure_resize (widget);
priv->alloc_needed = FALSE;
- priv->alloc_needed_on_child = FALSE;
gtk_widget_update_paintables (widget);