[gnome-shell] environment: Try harder to find a transition
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] environment: Try harder to find a transition
- Date: Fri, 20 Sep 2019 16:53:55 +0000 (UTC)
commit b6754d7db7f4522c336158fafe6f469fc8263b1b
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Sep 20 02:50:36 2019 +0200
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 1f9420035d..38d1d281a6 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]