Citadel changes to gnome-shell

This commit is contained in:
2021-12-03 14:04:05 -05:00
parent bc533af73f
commit 9cbbbab03a
41 changed files with 3211 additions and 37 deletions

View File

@@ -108,6 +108,7 @@ class WorkspacesView extends WorkspacesViewBase {
this._updateWorkspaces();
workspaceManager.connectObject(
'notify::n-workspaces', this._updateWorkspaces.bind(this),
'context-switched', this._refreshWorkspaces.bind(this),
'workspaces-reordered', () => {
this._workspaces.sort((a, b) => {
return a.metaWorkspace.index() - b.metaWorkspace.index();
@@ -434,6 +435,13 @@ class WorkspacesView extends WorkspacesViewBase {
}
}
_refreshWorkspaces() {
for (let ws = this._workspaces.pop(); ws; ws = this._workspaces.pop()) {
ws.destroy();
}
this._updateWorkspaces();
}
_updateWorkspaces() {
let workspaceManager = global.workspace_manager;
let newNumWorkspaces = workspaceManager.n_workspaces;