[clutter] stage: Use clutter_actor_set_allocation()



commit 480514b721e985bad1c8aed69fbee1bbb24260c0
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Jan 19 13:40:02 2012 +0000

    stage: Use clutter_actor_set_allocation()
    
    Instead of chaining up, given that we want to bypass chaining up and
    just set the allocation. This also allows us to bail out of the
    overridden allocate vfunc check, given that we want the default Actor
    behaviour to apply - including eventual layout manager delegates.

 clutter/clutter-stage.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index a5ccf55..0089361 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -325,15 +325,12 @@ clutter_stage_allocate (ClutterActor           *self,
    */
   if ((!clutter_feature_available (CLUTTER_FEATURE_STAGE_STATIC)))
     {
-      ClutterActorClass *klass;
-
       CLUTTER_NOTE (LAYOUT,
                     "Following allocation to %dx%d (origin %s)",
                     width, height,
                     origin_changed ? "changed" : "not changed");
 
-      klass = CLUTTER_ACTOR_CLASS (clutter_stage_parent_class);
-      klass->allocate (self, box, flags);
+      clutter_actor_set_allocation (self, box, flags);
 
       /* Ensure the window is sized correctly */
       if (!priv->is_fullscreen)
@@ -373,7 +370,6 @@ clutter_stage_allocate (ClutterActor           *self,
   else
     {
       ClutterActorBox override = { 0, };
-      ClutterActorClass *klass;
 
       /* override the passed allocation */
       override.x1 = 0;
@@ -390,8 +386,7 @@ clutter_stage_allocate (ClutterActor           *self,
                     origin_changed ? "changed" : "not changed");
 
       /* and store the overridden allocation */
-      klass = CLUTTER_ACTOR_CLASS (clutter_stage_parent_class);
-      klass->allocate (self, &override, flags);
+      clutter_actor_set_allocation (self, &override, flags);
     }
 
   /* XXX: Until Cogl becomes fully responsible for backend windows



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