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
This commit is contained in:
Marco Trevisan (Treviño) 2019-09-20 16:28:22 +02:00
parent 63a0b702c9
commit 1e637bd7e1

View File

@ -1214,11 +1214,11 @@ clutter_timeline_pause (ClutterTimeline *timeline)
priv = timeline->priv; priv = timeline->priv;
if (priv->delay_id == 0 && !priv->is_playing)
return;
clutter_timeline_cancel_delay (timeline); clutter_timeline_cancel_delay (timeline);
if (!priv->is_playing)
return;
priv->msecs_delta = 0; priv->msecs_delta = 0;
set_is_playing (timeline, FALSE); set_is_playing (timeline, FALSE);