[gnome-shell] workspacesView: Only animate primary view



commit 52a7481ba623937181327bd3a908e5e95b566efa
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jul 7 13:06:29 2020 +0200

    workspacesView: Only animate primary view
    
    Non-primary views always use their monitor's work area for their
    geometry, so there's nothing to animate when leaving the overview.
    
    The animation is already limited to the primary view when entering
    the overview, so this is also more consistent.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353

 js/ui/workspacesView.js | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index af767a4346..ea5156836b 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -569,14 +569,6 @@ class WorkspacesDisplay extends St.Widget {
 
     animateFromOverview(fadeOnPrimary) {
         for (let i = 0; i < this._workspacesViews.length; i++) {
-            const { x, y, width, height } =
-                Main.layoutManager.getWorkAreaForMonitor(i);
-            this._workspacesViews[i].ease({
-                x, y, width, height,
-                duration: ANIMATION_TIME,
-                mode: Clutter.AnimationMode.EASE_OUT_QUAD,
-            });
-
             let animationType;
             if (fadeOnPrimary && i == this._primaryIndex)
                 animationType = AnimationType.FADE;
@@ -584,6 +576,15 @@ class WorkspacesDisplay extends St.Widget {
                 animationType = AnimationType.ZOOM;
             this._workspacesViews[i].animateFromOverview(animationType);
         }
+
+        const { primaryIndex } = Main.layoutManager;
+        const { x, y, width, height } =
+            Main.layoutManager.getWorkAreaForMonitor(primaryIndex);
+        this._getPrimaryView().ease({
+            x, y, width, height,
+            duration: ANIMATION_TIME,
+            mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+        });
     }
 
     vfunc_hide() {


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