[clutter] box: Munge the allocation passed to the layout manager



commit 3314385119b92b19114417c11d05b98617d9d83d
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Wed Aug 24 18:36:19 2011 +0100

    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 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-box.c b/clutter/clutter-box.c
index 26d7696..eea5b3b 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]