windowManager: Handle reordering of workspaces
MetaWorkspaceManager gained the ability to reorder workspaces, so make sure to pick up the new order when that happens. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1497
This commit is contained in:
parent
a722b4c51d
commit
6205d5eb27
@ -187,6 +187,9 @@ var WorkspaceTracker = class {
|
|||||||
let workspaceManager = global.workspace_manager;
|
let workspaceManager = global.workspace_manager;
|
||||||
workspaceManager.connect('notify::n-workspaces',
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
this._nWorkspacesChanged.bind(this));
|
this._nWorkspacesChanged.bind(this));
|
||||||
|
workspaceManager.connect('workspaces-reordered', () => {
|
||||||
|
this._workspaces.sort((a, b) => a.index() - b.index());
|
||||||
|
});
|
||||||
global.window_manager.connect('switch-workspace',
|
global.window_manager.connect('switch-workspace',
|
||||||
this._queueCheckWorkspaces.bind(this));
|
this._queueCheckWorkspaces.bind(this));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user