[clutter] timeline: Emit last ::completed before ::stopped



commit e01f9f330dc87f308d2a064eae4d7f75fe66ee8d
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Jun 12 22:44:42 2012 +0100

    timeline: Emit last ::completed before ::stopped
    
    The ::stopped signal should be emitted at the end of the Timeline, after
    the last ::completed signal emission, in order to have a proper
    chronological progress of signal emissions:
    
      started â new-frame â [ ... ] â completed â stopped
    
    This way, ::stopped can perform a proper teardown of the state set up
    during ::started, without interfering with the potential cyclical
    emission of ::completed.

 clutter/clutter-timeline.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-timeline.c b/clutter/clutter-timeline.c
index ae1d3e0..55a17a8 100644
--- a/clutter/clutter-timeline.c
+++ b/clutter/clutter-timeline.c
@@ -1034,10 +1034,12 @@ clutter_timeline_do_frame (ClutterTimeline *timeline)
            * done in the above new-frame signal handler?
            */
           set_is_playing (timeline, FALSE);
+
+          g_signal_emit (timeline, timeline_signals[COMPLETED], 0);
           g_signal_emit (timeline, timeline_signals[STOPPED], 0, TRUE);
         }
-
-      g_signal_emit (timeline, timeline_signals[COMPLETED], 0);
+      else
+        g_signal_emit (timeline, timeline_signals[COMPLETED], 0);
 
       priv->current_repeat += 1;
 



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