From 060b05cc29f74d610159a33d880f0fe6582d260c Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 11 Oct 2012 17:23:34 +0200 Subject: [PATCH] actor: Remove transition when stopping it This covers more cases when the transition completes but was still being tracked by its actor. https://bugzilla.gnome.org/show_bug.cgi?id=685982 --- clutter/clutter-actor.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index c382cecca..aebabb805 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -3953,9 +3953,14 @@ _clutter_actor_stop_transitions (ClutterActor *self) { TransitionClosure *closure = value; - /* if the transition is implicit we just remove it now */ - if (closure->is_implicit) - g_hash_table_iter_remove (&iter); + /* implicit transitions, and automatically managed explicit ones, + * should be removed at this point + */ + if (closure->is_implicit || + clutter_transition_get_remove_on_complete (closure->transition)) + { + g_hash_table_iter_remove (&iter); + } else { /* otherwise we stop it, and the transition will be removed @@ -18525,7 +18530,8 @@ on_transition_stopped (ClutterTransition *transition, t_quark = g_quark_from_string (clos->name); t_name = g_strdup (clos->name); - if (clos->is_implicit) + if (clos->is_implicit || + clutter_transition_get_remove_on_complete (transition)) { /* we take a reference here because removing the closure * will release the reference on the transition, and we