workspacesView: Update visibility after updating workspaces

When the number of workspaces changes, it is possible that one
of the visible (non-active) workspaces is removed, and another
invisible workspace moves in its place.

Make sure that workspaces are shown as necessary in this case.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6519

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2699>
This commit is contained in:
Florian Müllner 2023-03-18 17:54:35 +01:00 committed by Marge Bot
parent 112a24684c
commit 95386a1423

View File

@ -118,7 +118,6 @@ class WorkspacesView extends WorkspacesViewBase {
global.window_manager.connectObject('switch-workspace',
this._activeWorkspaceChanged.bind(this), this);
this._updateVisibility();
}
_getFirstFitAllWorkspaceBox(box, spacing, vertical) {
@ -465,6 +464,7 @@ class WorkspacesView extends WorkspacesViewBase {
}
this._updateWorkspacesState();
this._updateVisibility();
}
_activeWorkspaceChanged(_wm, _from, _to, _direction) {