From 3314385119b92b19114417c11d05b98617d9d83d Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Aug 2011 18:36:19 +0100 Subject: [PATCH] box: Munge the allocation passed to the layout manager The actor is in charge of providing to the LayoutManager the available allocation. ClutterBox should not just pass the box it got from its parent: it should, instead, provide a normalized box, with an origin in (0, 0) and the available size. https://bugzilla.gnome.org/show_bug.cgi?id=649631 --- clutter/clutter-box.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-box.c b/clutter/clutter-box.c index 26d7696be..eea5b3bd3 100644 --- a/clutter/clutter-box.c +++ b/clutter/clutter-box.c @@ -384,13 +384,20 @@ clutter_box_real_allocate (ClutterActor *actor, { ClutterBoxPrivate *priv = CLUTTER_BOX (actor)->priv; ClutterActorClass *klass; + ClutterActorBox box; + gfloat w, h; klass = CLUTTER_ACTOR_CLASS (clutter_box_parent_class); klass->allocate (actor, allocation, flags); + clutter_actor_box_get_size (allocation, &w, &h); + + clutter_actor_box_set_origin (&box, 0.f, 0.f); + clutter_actor_box_set_size (&box, w, h); + clutter_layout_manager_allocate (priv->manager, CLUTTER_CONTAINER (actor), - allocation, flags); + &box, flags); } static void