[clutter] actor: Remove transition when stopping it



commit 060b05cc29f74d610159a33d880f0fe6582d260c
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date:   Thu Oct 11 17:23:34 2012 +0200

    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 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index c382cec..aebabb8 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]