clutter/actor-meta: Warn if an actor modifier is altered mid paint
Nothing should ever disable an actor modifier (e.g. effect) during the paint sequence, nor should any actor be set or unset on it. If this would happen, log warnings so that it can be tracked down. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1166
This commit is contained in:
parent
a8f6cada88
commit
50e0ae3cf3
@ -88,6 +88,10 @@ static void
|
||||
clutter_actor_meta_real_set_actor (ClutterActorMeta *meta,
|
||||
ClutterActor *actor)
|
||||
{
|
||||
g_warn_if_fail (!meta->priv->actor ||
|
||||
!CLUTTER_ACTOR_IN_PAINT (meta->priv->actor));
|
||||
g_warn_if_fail (!actor || !CLUTTER_ACTOR_IN_PAINT (actor));
|
||||
|
||||
if (meta->priv->actor == actor)
|
||||
return;
|
||||
|
||||
@ -293,6 +297,9 @@ clutter_actor_meta_set_enabled (ClutterActorMeta *meta,
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR_META (meta));
|
||||
|
||||
g_warn_if_fail (!meta->priv->actor ||
|
||||
!CLUTTER_ACTOR_IN_PAINT (meta->priv->actor));
|
||||
|
||||
is_enabled = !!is_enabled;
|
||||
|
||||
if (meta->priv->is_enabled == is_enabled)
|
||||
|
Loading…
Reference in New Issue
Block a user