[mutter] clutter/timeline: Add running timeline to frameclock if it changes
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/timeline: Add running timeline to frameclock if it changes
- Date: Thu, 2 Jul 2020 20:51:02 +0000 (UTC)
commit 9b054f4a1b921c9eb49661d75411acfa0eb2309a
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Jun 2 15:06:21 2020 +0200
clutter/timeline: Add running timeline to frameclock if it changes
It's intended that timelines can change frame clock while running; but
up until now it'd only add itself if the frame clock was set when
started.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
clutter/clutter/clutter-timeline.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/clutter/clutter/clutter-timeline.c b/clutter/clutter/clutter-timeline.c
index dd8451323d..dea89bb385 100644
--- a/clutter/clutter/clutter-timeline.c
+++ b/clutter/clutter/clutter-timeline.c
@@ -2523,8 +2523,14 @@ clutter_timeline_set_frame_clock (ClutterTimeline *timeline,
if (priv->frame_clock == frame_clock)
return;
+ if (priv->frame_clock && priv->is_playing)
+ remove_timeline (timeline);
+
g_set_object (&priv->frame_clock, frame_clock);
g_object_notify_by_pspec (G_OBJECT (timeline),
obj_props[PROP_FRAME_CLOCK]);
+
+ if (priv->is_playing)
+ add_timeline (timeline);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]