From 66820a1e635d29bd7f3febd6568ccc8a0883e248 Mon Sep 17 00:00:00 2001 From: Louis Pontoise Date: Fri, 4 Sep 2020 02:04:03 +0900 Subject: [PATCH] fix: focused wrong window in rare scenario --- src/logic/Windows.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/logic/Windows.swift b/src/logic/Windows.swift index 08107433..c5e44fac 100644 --- a/src/logic/Windows.swift +++ b/src/logic/Windows.swift @@ -40,6 +40,8 @@ class Windows { static func moveFocusedWindowIndexAfterWindowDestroyedInBackground(_ destroyedWindowIndex: Int) { if focusedWindowIndex > destroyedWindowIndex { cycleFocusedWindowIndex(-1) + } else if focusedWindowIndex == destroyedWindowIndex && !focusedWindow()!.shouldShowTheUser { + cycleFocusedWindowIndex(1) } }