Citadel changes to gnome-shell

This commit is contained in:
2021-12-03 14:04:05 -05:00
parent a2ffd14a35
commit f675f95c67
39 changed files with 3205 additions and 33 deletions

View File

@ -113,6 +113,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();
@ -443,6 +444,13 @@ class WorkspacesView extends WorkspacesViewBase {
this.set_child_above_sibling(activeWorkspace, null);
}
_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;