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
This commit is contained in:
parent
2a9977a5b3
commit
b6754d7db7
@ -121,7 +121,9 @@ function _easeActor(actor, params) {
|
|||||||
actor.set(params);
|
actor.set(params);
|
||||||
actor.restore_easing_state();
|
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)
|
if (transition)
|
||||||
transition.connect('stopped', (t, finished) => callback(finished));
|
transition.connect('stopped', (t, finished) => callback(finished));
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user