Fix focus resignation (#227)

Tento commit je obsažen v:
Max Goedjen
2021-08-08 22:57:01 +00:00
odevzdal GitHub
rodič 35aea0729d
revize 9d6bbd2a04
+3 -1
Zobrazit soubor
@@ -22,7 +22,9 @@ struct LaunchAgentController {
func forceLaunch(completion: ((Bool) -> Void)?) { func forceLaunch(completion: ((Bool) -> Void)?) {
Logger().debug("Agent is not running, attempting to force launch") Logger().debug("Agent is not running, attempting to force launch")
let url = Bundle.main.bundleURL.appendingPathComponent("Contents/Library/LoginItems/SecretAgent.app") let url = Bundle.main.bundleURL.appendingPathComponent("Contents/Library/LoginItems/SecretAgent.app")
NSWorkspace.shared.openApplication(at: url, configuration: NSWorkspace.OpenConfiguration()) { app, error in let config = NSWorkspace.OpenConfiguration()
config.activates = false
NSWorkspace.shared.openApplication(at: url, configuration: config) { app, error in
DispatchQueue.main.async { DispatchQueue.main.async {
completion?(error == nil) completion?(error == nil)
} }