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:
parent
f7bae2a064
commit
480514b721
@ -325,15 +325,12 @@ clutter_stage_allocate (ClutterActor *self,
|
|||||||
*/
|
*/
|
||||||
if ((!clutter_feature_available (CLUTTER_FEATURE_STAGE_STATIC)))
|
if ((!clutter_feature_available (CLUTTER_FEATURE_STAGE_STATIC)))
|
||||||
{
|
{
|
||||||
ClutterActorClass *klass;
|
|
||||||
|
|
||||||
CLUTTER_NOTE (LAYOUT,
|
CLUTTER_NOTE (LAYOUT,
|
||||||
"Following allocation to %dx%d (origin %s)",
|
"Following allocation to %dx%d (origin %s)",
|
||||||
width, height,
|
width, height,
|
||||||
origin_changed ? "changed" : "not changed");
|
origin_changed ? "changed" : "not changed");
|
||||||
|
|
||||||
klass = CLUTTER_ACTOR_CLASS (clutter_stage_parent_class);
|
clutter_actor_set_allocation (self, box, flags);
|
||||||
klass->allocate (self, box, flags);
|
|
||||||
|
|
||||||
/* Ensure the window is sized correctly */
|
/* Ensure the window is sized correctly */
|
||||||
if (!priv->is_fullscreen)
|
if (!priv->is_fullscreen)
|
||||||
@ -373,7 +370,6 @@ clutter_stage_allocate (ClutterActor *self,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClutterActorBox override = { 0, };
|
ClutterActorBox override = { 0, };
|
||||||
ClutterActorClass *klass;
|
|
||||||
|
|
||||||
/* override the passed allocation */
|
/* override the passed allocation */
|
||||||
override.x1 = 0;
|
override.x1 = 0;
|
||||||
@ -390,8 +386,7 @@ clutter_stage_allocate (ClutterActor *self,
|
|||||||
origin_changed ? "changed" : "not changed");
|
origin_changed ? "changed" : "not changed");
|
||||||
|
|
||||||
/* and store the overridden allocation */
|
/* and store the overridden allocation */
|
||||||
klass = CLUTTER_ACTOR_CLASS (clutter_stage_parent_class);
|
clutter_actor_set_allocation (self, &override, flags);
|
||||||
klass->allocate (self, &override, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: Until Cogl becomes fully responsible for backend windows
|
/* XXX: Until Cogl becomes fully responsible for backend windows
|
||||||
|
Loading…
x
Reference in New Issue
Block a user