From 9351bf860770eabff85a2ca64433d56c88cd9d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Thu, 22 Mar 2018 09:50:32 +0100 Subject: [PATCH] Fix left over `spaces._spaces` references --- tiling.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tiling.js b/tiling.js index f3dff46..ac489b0 100644 --- a/tiling.js +++ b/tiling.js @@ -127,14 +127,13 @@ var spaces = (function () { for (let i=0; i < nWorkspaces; i++) { let workspace = global.screen.get_workspace_by_index(i); workspaces[workspace] = true; - if (this._spaces[workspace] === undefined) { + if (spaces.spaceOf(workspace) === undefined) { debug('workspace added', workspace); this.addSpace(workspace); } } - for (let key in this._spaces) { - let space = this._spaces[key]; + for (let [workspace, space] of spaces) { if (workspaces[space.workspace] !== true) { debug('workspace removed', space.workspace); this.removeSpace(space); @@ -1167,8 +1166,8 @@ function disable () { global.screen.disconnect(nWorkspacesSignal); global.screen.disconnect(workspaceRemovedSignal); global.display.disconnect(windowCreatedSignal); - for (let workspace in spaces._spaces) { - spaces.removeSpace(spaces._spaces[workspace]); + for (let [workspace, space] of spaces) { + spaces.removeSpace(space); } global.screen.disconnect(monitorsChangedId);