[gnome-shell] environment: Skip property animations while hidden



commit 0888a9bffd256f2552224da465befc8ba7b54ad6
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Sep 10 15:28:42 2019 +0200

    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

 js/ui/environment.js | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/js/ui/environment.js b/js/ui/environment.js
index 0c291b0a20..bf5b7cb4dd 100644
--- a/js/ui/environment.js
+++ b/js/ui/environment.js
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]