Blob Blame History Raw
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Fri, 20 Sep 2019 16:28:22 +0200
Subject: clutter/timeline: Don't emit ::paused signal on delayed timelines

If a timeline is delayed and we request to stop or pause it, we are emitting
the "::paused" signal on it, however this has never been started, and so
nothing has really be paused.

So, just try to cancel the delay on pause and return if not playing.

No code in mutter or gnome-shell is affected by this, so it is safe to
change.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/805

Origin: upstream, commit:1e637bd7e1b2a4316d1cf6da80966d43819a10df
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/eoan/+source/mutter/+bug/1841794
Bug: https://gitlab.gnome.org/GNOME/mutter/issues/815
---
 clutter/clutter/clutter-timeline.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clutter/clutter/clutter-timeline.c b/clutter/clutter/clutter-timeline.c
index df7db16..bb4f77f 100644
--- a/clutter/clutter/clutter-timeline.c
+++ b/clutter/clutter/clutter-timeline.c
@@ -1214,11 +1214,11 @@ clutter_timeline_pause (ClutterTimeline *timeline)
 
   priv = timeline->priv;
 
-  if (priv->delay_id == 0 && !priv->is_playing)
-    return;
-
   clutter_timeline_cancel_delay (timeline);
 
+  if (!priv->is_playing)
+    return;
+
   priv->msecs_delta = 0;
   set_is_playing (timeline, FALSE);