[gnome-shell/gbsneto/40-stuff: 16/68] workspacesView: Always show all workspaces




commit 30648c2d84036c0df43a74d0a6c27827f4021a8d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sun Jun 7 00:19:42 2020 -0300

    workspacesView: Always show all workspaces

 js/ui/workspacesView.js | 27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 7185df8e1d..88fc593504 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -132,7 +132,6 @@ class WorkspacesView extends WorkspacesViewBase {
         for (let w = 0; w < this._workspaces.length; w++)
             this._workspaces[w].zoomToOverview();
         this._updateScrollPosition();
-        this._updateVisibility();
     }
 
     animateFromOverview() {
@@ -150,35 +149,15 @@ class WorkspacesView extends WorkspacesViewBase {
         const active = workspaceManager.get_active_workspace_index();
 
         this._animating = true;
-        this._updateVisibility();
 
         this._scrollAdjustment.remove_transition('value');
         this._scrollAdjustment.ease(active, {
             duration: WORKSPACE_SWITCH_TIME,
             mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
-            onComplete: () => {
-                this._animating = false;
-                this._updateVisibility();
-            },
+            onComplete: () => (this._animating = false),
         });
     }
 
-    _updateVisibility() {
-        let workspaceManager = global.workspace_manager;
-        let active = workspaceManager.get_active_workspace_index();
-
-        for (let w = 0; w < this._workspaces.length; w++) {
-            let workspace = this._workspaces[w];
-
-            if (this._animating || this._gestureActive)
-                workspace.show();
-            else if (this._inDrag)
-                workspace.visible = Math.abs(w - active) <= 1;
-            else
-                workspace.visible = w == active;
-        }
-    }
-
     _updateWorkspaces() {
         let workspaceManager = global.workspace_manager;
         let newNumWorkspaces = workspaceManager.n_workspaces;
@@ -228,16 +207,12 @@ class WorkspacesView extends WorkspacesViewBase {
 
     startTouchGesture() {
         this._gestureActive = true;
-
-        this._updateVisibility();
     }
 
     endTouchGesture() {
         this._gestureActive = false;
 
-        // Make sure title captions etc are shown as necessary
         this._scrollToActive();
-        this._updateVisibility();
     }
 
     // sync the workspaces' positions to the value of the scroll adjustment


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