fix: focusing alt-tab own windows could fail (#759)

This commit is contained in:
Louis Pontoise committed 2022-05-28 02:29:54 +09:00
1 parent c44057f47d
commit 08720d8eeb
1 file changed
+3
+3
View File
@@ -164,6 +164,9 @@ class Window {
} else {
application.runningApplication.activate(options: .activateIgnoringOtherApps)
}
} else if let bundleID = application.runningApplication.bundleIdentifier, bundleID == App.id {
App.shared.activate(ignoringOtherApps: true)
App.app.window(withWindowNumber: Int(cgWindowId))?.makeKeyAndOrderFront(nil)
} else {
// macOS bug: when switching to a System Preferences window in another space, it switches to that space,
// but quickly switches back to another window in that space