From 86dccdbfc089621d2c9dce6371b4f9099ddc242d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Sat, 9 Sep 2017 16:56:24 +0200 Subject: [PATCH] `focus` is no longer an index --- tiling.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tiling.js b/tiling.js index 3d97941..28ef1c3 100644 --- a/tiling.js +++ b/tiling.js @@ -173,17 +173,13 @@ remove_handler = (ws, meta_window) => { return pages.splice(removed_i, 1) - // At this point the `focus` index might be invalid so we correct it: - if(removed_i < focus) { - focus--; - } // Remove our signal handlers: Needed for non-closed windows. // (closing a window seems to clean out it's signal handlers) meta_window.disconnect(focus_wrapper); // Re-layout: Needed if the removed window didn't have focus. // Not sure if we can check if that was the case or not? - focus_handler(pages[focus]) + focus_handler(pages[focus()]) } add_all_from_workspace = (workspace) => {