clutter/timeline: Make the warning about detached actors more helpful

By including the debug name of the actor and the duration of the
animation the source of such detached actors can be more easily
determined.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2011
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2088>
This commit is contained in:
Sebastian Keller 2021-11-14 18:17:00 +01:00 committed by Marge Bot
parent c693a7e58b
commit 92c98d5522

View File

@ -97,6 +97,7 @@
#include "clutter-timeline.h"
#include "deprecated/clutter-timeline.h"
#include "clutter-actor-private.h"
#include "clutter-debug.h"
#include "clutter-easing.h"
#include "clutter-enum-types.h"
@ -428,7 +429,10 @@ update_frame_clock (ClutterTimeline *timeline)
if (!stage)
{
if (priv->is_playing)
g_warning ("Timelines with detached actors are not supported");
g_warning ("Timelines with detached actors are not supported. "
"%s in animation of duration %ums but not on stage.",
_clutter_actor_get_debug_name (priv->actor),
priv->duration);
goto out;
}