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.
This commit is contained in:
Emmanuele Bassi 2012-01-19 13:40:02 +00:00
parent f7bae2a064
commit 480514b721

View File

@ -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