diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2021-02-08 17:34:00 +0000 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2021-02-08 21:17:45 +0000 |
commit | cb24b31d992359d0daaa6193ab0a28930ab2601b (patch) | |
tree | 41168da3b12f6e0df4a8aca76283c43d98a5a798 | |
parent | 22ab643c568932b8877a12053fe56ba71658785d (diff) | |
download | mutter-cherry-pick-eaa98a7c.tar.gz |
clutter/timeline: Clear stage view listener when actor destroyedcherry-pick-eaa98a7c
We might have a stage view listener attached to the stage itself if the
actor didn't have a suitable frame clock when the actor was associated
with the timeline. We'd then listen to stage-views-changed signals on
the stage itself to be able to attach to a frame clock when one
appeared.
What went wrong is that if an actor that didn't have a frameclock was
associated with a timeline, but then destroyed, the timeline would
disassociate itself from the actor, but it'd still listen on the
stage-views-changed signal on the stage. This would be in itself
harmless, until the timeline itself is destroyed, as at this point, it
wouldn't clean up the stage-views-changed listener on the stage, as it's
assumed to only be valid when there is an actor attached.
Fix this issue by cleaning up the stage's stage-views-changed listener
when the actor is destroyed, as we wouldn't be able to make use of it by
then anyway.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3323
(cherry picked from commit eaa98a7cd6d209819792f3904385ed48114460af)
-rw-r--r-- | clutter/clutter/clutter-timeline.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clutter/clutter/clutter-timeline.c b/clutter/clutter/clutter-timeline.c index 23392fc99..f7b9b98a7 100644 --- a/clutter/clutter/clutter-timeline.c +++ b/clutter/clutter/clutter-timeline.c @@ -311,6 +311,7 @@ on_actor_destroyed (ClutterActor *actor, { ClutterTimelinePrivate *priv = timeline->priv; + g_clear_signal_handler (&priv->stage_stage_views_handler_id, priv->stage); priv->actor = NULL; } |