environment: Skip property animations while hidden

For implicit animations, Clutter will skip any transitions while
an actor is unmapped, and just set the property directly. Do the
same in our ease_property() convencience method.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/708
This commit is contained in:
Florian Müllner 2019-09-10 15:28:42 +02:00 committed by Florian Müllner
parent 5e82d72424
commit 0888a9bffd

View File

@ -139,6 +139,11 @@ function _easeActorProperty(actor, propName, target, params) {
params.duration = adjustAnimationTime(params.duration);
let duration = Math.floor(params.duration || 0);
// Copy Clutter's behavior for implicit animations, see
// should_skip_implicit_transition()
if (actor instanceof Clutter.Actor && !actor.mapped)
duration = 0;
let callback = _makeEaseCallback(params);
// cancel overwritten transition