diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 99a1e6597..9e1dccb0f 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -404,6 +404,7 @@ class WorkspacesDisplay extends St.Widget { this._syncWorkspacesActualGeometry(); }); + this._primaryVisible = true; this._primaryIndex = Main.layoutManager.primaryIndex; this._workspacesViews = []; @@ -570,6 +571,18 @@ class WorkspacesDisplay extends St.Widget { return this._getPrimaryView().navigate_focus(from, direction, false); } + setPrimaryWorkspaceVisible(visible) { + if (this._primaryVisible === visible) + return; + + this._primaryVisible = visible; + + const primaryIndex = Main.layoutManager.primaryIndex; + const primaryWorkspace = this._workspacesViews[primaryIndex]; + if (primaryWorkspace) + primaryWorkspace.visible = visible; + } + animateToOverview(fadeOnPrimary) { this.show(); this._updateWorkspacesViews(); @@ -672,6 +685,8 @@ class WorkspacesDisplay extends St.Widget { this._workspacesViews.push(view); Main.layoutManager.overviewGroup.add_actor(view); } + + this._workspacesViews[this._primaryIndex].visible = this._primaryVisible; } _getMonitorIndexForEvent(event) {