fix: focused wrong window in rare scenario

This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-09-05 04:01:32 +09:00
1 parent 63d85453b0
commit 66820a1e63
1 file changed
+2
+2
View File
@@ -40,6 +40,8 @@ class Windows {
static func moveFocusedWindowIndexAfterWindowDestroyedInBackground(_ destroyedWindowIndex: Int) {
if focusedWindowIndex > destroyedWindowIndex {
cycleFocusedWindowIndex(-1)
} else if focusedWindowIndex == destroyedWindowIndex && !focusedWindow()!.shouldShowTheUser {
cycleFocusedWindowIndex(1)
}
}