mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 09:59:03 +00:00
actor: Ensure static scope to allocation-changed arguments
In theory, handlers connected to the ::allocation-changed signal may be able to modify the actor's real allocation and allocation flags, especially now that we use STATIC_SCOPE; let's avoid this, so that we don't regret it later.
This commit is contained in:
parent
762e0de2c6
commit
155f7741fe
@ -2113,9 +2113,14 @@ clutter_actor_real_allocate (ClutterActor *self,
|
||||
clutter_actor_maybe_layout_children (self, box, flags);
|
||||
|
||||
if (changed)
|
||||
g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0,
|
||||
&priv->allocation,
|
||||
priv->allocation_flags);
|
||||
{
|
||||
ClutterActorBox signal_box = priv->allocation;
|
||||
ClutterAllocationFlags signal_flags = priv->allocation_flags;
|
||||
|
||||
g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0,
|
||||
&signal_box,
|
||||
signal_flags);
|
||||
}
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (self));
|
||||
}
|
||||
@ -7981,9 +7986,14 @@ clutter_actor_set_allocation (ClutterActor *self,
|
||||
clutter_actor_maybe_layout_children (self, box, flags);
|
||||
|
||||
if (changed)
|
||||
g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0,
|
||||
&priv->allocation,
|
||||
priv->allocation_flags);
|
||||
{
|
||||
ClutterActorBox signal_box = priv->allocation;
|
||||
ClutterAllocationFlags signal_flags = priv->allocation_flags;
|
||||
|
||||
g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0,
|
||||
&signal_box,
|
||||
signal_flags);
|
||||
}
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (self));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user