[gnome-shell] util: Don't wiggle when animations are disabled



commit 475919720058ee9de45b5f68bb1ee062f7f35563
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Feb 22 14:25:37 2020 +0100

    util: Don't wiggle when animations are disabled
    
    repeatCount and autoReverse don't play well with animations disabled:
    They cause password entries to wiggle themselves off-screen (by ending
    up with some off-scale translation-x value).
    
    While we should handle this more gracefully in the transition helpers,
    it also makes sense to handle the case directly in wiggle(): As it
    uses a chain of three transitions, we would still end up with a crude
    one-frame-per-transition wiggle "animation".
    
    Instead, do no animation at all as you would expect when animations are
    disabled.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/2236

 js/misc/util.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/js/misc/util.js b/js/misc/util.js
index 9d30b3f95d..c68604e87b 100644
--- a/js/misc/util.js
+++ b/js/misc/util.js
@@ -445,6 +445,9 @@ function ensureActorVisibleInScrollView(scrollView, actor) {
 }
 
 function wiggle(actor, params) {
+    if (!St.Settings.get().enable_animations)
+        return;
+
     params = Params.parse(params, {
         offset: WIGGLE_OFFSET,
         duration: WIGGLE_DURATION,


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