From b6754d7db7f4522c336158fafe6f469fc8263b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 20 Sep 2019 02:50:36 +0200 Subject: [PATCH] environment: Try harder to find a transition When easing, we need the transition of one of the involved properties to connect our callbacks. Currently we simply get the transition for the first property, however as Clutter optimizes the case where a property doesn't actually change, that transition may be NULL even though we still animate other properties. So instead of only looking at the transition of the first property, try to find a transition for any of the involved properties. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1572 --- js/ui/environment.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/environment.js b/js/ui/environment.js index 1f9420035..38d1d281a 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -121,7 +121,9 @@ function _easeActor(actor, params) { actor.set(params); actor.restore_easing_state(); - let transition = actor.get_transition(animatedProps[0]); + let transition = animatedProps.map(p => actor.get_transition(p)) + .find(t => t !== null); + if (transition) transition.connect('stopped', (t, finished) => callback(finished)); else