mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
clutter/actor: Set initial allocation to uninitialized ClutterActorBox
We currently initialize the ClutterActorBox of the actors allocation to zero, but there's a difference between a valid zero-allocation and an actor having never been allocated. Currently it's impossible for us to detect the latter case in a reliable way and we use the needs_allocation flag for this, which may also be set in other situations. So initialize the allocation of actors to the newly added UNINITIALIZED ClutterActorBox, which will make it easier to detect whether an actor already got its initial allocation. This also fixes another issue right now: Actors which get allocated a (valid) zero allocation, will now notify the "allocation" property in this case. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1290
This commit is contained in:
parent
0bfb995bff
commit
eb9cd3857d
@ -8694,6 +8694,8 @@ clutter_actor_init (ClutterActor *self)
|
||||
|
||||
self->priv = priv = clutter_actor_get_instance_private (self);
|
||||
|
||||
priv->allocation = (ClutterActorBox) CLUTTER_ACTOR_BOX_UNINITIALIZED;
|
||||
|
||||
priv->opacity = 0xff;
|
||||
priv->show_on_set_parent = TRUE;
|
||||
priv->resource_scale = -1.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user