fix: show window of some apps like jetbrains apps (#1249 #1079 #1392)

I am able to reproduce the issue by reinstall JetBrains AppCode. The first time I open AppCode after reinstall it, AltTab never show AppCode window. I debug the code on my Mac, I find that AltTab can get the event of app launched but never get the event of finishedLaunching. So I just remove the code runningApplication.isFinishedLaunching. After that, AltTab work well and the issue is fixed.
This commit is contained in:
metacodes authored and Louis Pontoise committed 2022-04-07 21:05:18 +09:00
1 parent 6887291151
commit 0b85b09f62
1 file changed
+1 -1
+1 -1
View File
@@ -72,7 +72,7 @@ class Application: NSObject {
}
func addAndObserveWindows() {
if runningApplication.isFinishedLaunching && runningApplication.activationPolicy != .prohibited && axUiElement == nil {
if runningApplication.activationPolicy != .prohibited && axUiElement == nil {
axUiElement = AXUIElementCreateApplication(pid)
AXObserverCreate(pid, axObserverCallback, &axObserver)
debugPrint("Adding app", pid ?? "nil", runningApplication.bundleIdentifier ?? "nil")