From 520ecf93c9b4648bdc9b2cb6f6b32d3f963fee76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Fri, 22 Sep 2017 17:05:07 +0200 Subject: [PATCH] Lookup the `space` using the workspace in `window-removed` handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a window is «always on visible workspace» (ie. stick() is run) `get_workspace` will return the active workspace, which is incorrect. --- tiling.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiling.js b/tiling.js index 5b49d58..3b0f191 100644 --- a/tiling.js +++ b/tiling.js @@ -368,12 +368,12 @@ add_handler = (ws, meta_window) => { meta_window.connect("focus", focus_wrapper) } -remove_handler = (ws, meta_window) => { +remove_handler = (workspace, meta_window) => { debug("window-removed", meta_window, meta_window.title); // Note: If `meta_window` was closed and had focus at the time, the next // window has already received the `focus` signal at this point. - let space = spaces[meta_window.get_workspace().workspace_index] + let space = spaces[workspace.workspace_index]; let removed_i = space.indexOf(meta_window) if (removed_i < 0) return