diff options
author | Emmanuele Bassi <ebassi@linux.intel.com> | 2011-07-18 13:45:55 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2011-07-18 15:31:55 +0100 |
commit | 58d7a147dee28a9c81c87fa32e54cba6a4cc8a20 (patch) | |
tree | d398f8e5a4831b93d7559352f5811fd0a5423de7 | |
parent | 7b650e4d3be512855fc7be506d45a050f59fc77e (diff) | |
download | clutter-58d7a147dee28a9c81c87fa32e54cba6a4cc8a20.tar.gz |
timeline: Cast elapsed time before emitting ::new-frame
When emitting a new-frame signal, priv->elapsed_time is passed as a
parameter. This is a gint64. The closure marshal uses an INT. On some
platforms, this is not received correctly by signal handlers (they
receive 0). One solution is to cast priv->elapsed_time to a gint when
emitting the signal.
We cannot change the signature of the signal without breaking ABI.
https://bugzilla.gnome.org/show_bug.cgi?id=654066
(cherry picked from commit 1402c0511239ede27855a836fd9ca9cc8dbf969d)
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
-rw-r--r-- | 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 a2db02fb5..98709306e 100644 --- a/clutter/clutter-timeline.c +++ b/clutter/clutter-timeline.c @@ -550,8 +550,10 @@ emit_frame_signal (ClutterTimeline *timeline) { ClutterTimelinePrivate *priv = timeline->priv; - g_signal_emit (timeline, timeline_signals[NEW_FRAME], 0, - priv->elapsed_time); + /* see bug https://bugzilla.gnome.org/show_bug.cgi?id=654066 */ + gint elapsed = (gint) priv->elapsed_time; + + g_signal_emit (timeline, timeline_signals[NEW_FRAME], 0, elapsed); } static gboolean |