From aa8c8127059326c2d13d9f8dd6a294e787e3760e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Feb 2010 12:08:07 +0000 Subject: [PATCH] box: Do not short-circuit size negotiation for empty Boxes The LayoutManager used might decide to have a default allocation or a default preferred size when empty. --- clutter/clutter-box.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/clutter/clutter-box.c b/clutter/clutter-box.c index 187d21224..837b0e785 100644 --- a/clutter/clutter-box.c +++ b/clutter/clutter-box.c @@ -308,20 +308,6 @@ clutter_box_real_get_preferred_width (ClutterActor *actor, { ClutterBoxPrivate *priv = CLUTTER_BOX (actor)->priv; - /* if we don't have any children don't bother proxying the - * call to the layout manager instance - */ - if (priv->children == NULL || priv->manager == NULL) - { - if (min_width) - *min_width = 0.0; - - if (natural_width) - *natural_width = 0.0; - - return; - } - clutter_layout_manager_get_preferred_width (priv->manager, CLUTTER_CONTAINER (actor), for_height, @@ -336,20 +322,6 @@ clutter_box_real_get_preferred_height (ClutterActor *actor, { ClutterBoxPrivate *priv = CLUTTER_BOX (actor)->priv; - /* if we don't have any children don't bother proxying the - * call to the layout manager instance - */ - if (priv->children == NULL || priv->manager == NULL) - { - if (min_height) - *min_height = 0.0; - - if (natural_height) - *natural_height = 0.0; - - return; - } - clutter_layout_manager_get_preferred_height (priv->manager, CLUTTER_CONTAINER (actor), for_width, @@ -367,9 +339,6 @@ clutter_box_real_allocate (ClutterActor *actor, klass = CLUTTER_ACTOR_CLASS (clutter_box_parent_class); klass->allocate (actor, allocation, flags); - if (priv->children == NULL || priv->manager == NULL) - return; - clutter_layout_manager_allocate (priv->manager, CLUTTER_CONTAINER (actor), allocation, flags);