From cf7f0e868b2011ff5d888162ef03ea0115d5ff6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Sat, 23 Sep 2017 17:08:17 +0200 Subject: [PATCH] window-removed: don't ensure windows that aren't part of the space --- tiling.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tiling.js b/tiling.js index ea376ca..7a8f789 100644 --- a/tiling.js +++ b/tiling.js @@ -453,7 +453,8 @@ remove_handler = (workspace, meta_window) => { let mru_list = global.display.get_tab_list(Meta.TabList.NORMAL, workspace); // The mru list might contain needy windows from other workspaces space.selectedWindow = - mru_list.filter(w => w.get_workspace() === workspace)[0]; + mru_list.filter(w => w.get_workspace() === workspace + && space.indexOf(w) !== -1 )[0]; } // Force a new ensure, since the focus_handler is run before window-removed