From b52aa9e6583be6bbef3197de916d04e9b72f681a Mon Sep 17 00:00:00 2001 From: Louis Pontoise Date: Thu, 7 May 2020 02:21:46 +0900 Subject: [PATCH] fix: fast shortcut press would fail to switch windows With many windows open, and a blazing fast shortcut press, AltTab would fail to switch as it would queue the focus task before the cycling task --- src/logic/Windows.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/logic/Windows.swift b/src/logic/Windows.swift index 0632ff62..34ca11fe 100644 --- a/src/logic/Windows.swift +++ b/src/logic/Windows.swift @@ -20,9 +20,7 @@ class Windows { } static func cycleFocusedWindowIndex(_ step: Int) { - DispatchQueue.main.async { () -> () in - updateFocusedWindowIndex(windowIndexAfterCycling(step)) - } + updateFocusedWindowIndex(windowIndexAfterCycling(step)) } static func windowIndexAfterCycling(_ step: Int) -> Int {