[gnome-shell/gnome-3-36] layout: Only show ripple animation when overview was toggled



commit f36e4b6ed5fb7ab78a4e3517a8eddb27e5cd2b0d
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jul 22 02:05:48 2020 +0200

    layout: Only show ripple animation when overview was toggled
    
    On X11, clients can grab keyboard on pointer (for example for popup
    menus), and as a result the pushModal() call when opening the overview
    fails.
    
    However when the hot corner was used to toggle the overview, we still
    show the ripple animation in that case, which is confusing as the action
    did not actually happen.
    
    Fix this by only showing the ripples if the overview is animating after
    calling toggle(), as that should be a reliable indication of whether
    the call was successful.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3005

 js/ui/layout.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 368f1d1a30..98e901fdea 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -1240,8 +1240,9 @@ class HotCorner extends Clutter.Actor {
             return;
 
         if (Main.overview.shouldToggleByCornerOrButton()) {
-            this._ripples.playAnimation(this._x, this._y);
             Main.overview.toggle();
+            if (Main.overview.animationInProgress)
+                this._ripples.playAnimation(this._x, this._y);
         }
     }
 


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