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:
1 parent
6887291151
commit
0b85b09f62
1 file changed
+1
-1
@@ -72,7 +72,7 @@ class Application: NSObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func addAndObserveWindows() {
|
func addAndObserveWindows() {
|
||||||
if runningApplication.isFinishedLaunching && runningApplication.activationPolicy != .prohibited && axUiElement == nil {
|
if runningApplication.activationPolicy != .prohibited && axUiElement == nil {
|
||||||
axUiElement = AXUIElementCreateApplication(pid)
|
axUiElement = AXUIElementCreateApplication(pid)
|
||||||
AXObserverCreate(pid, axObserverCallback, &axObserver)
|
AXObserverCreate(pid, axObserverCallback, &axObserver)
|
||||||
debugPrint("Adding app", pid ?? "nil", runningApplication.bundleIdentifier ?? "nil")
|
debugPrint("Adding app", pid ?? "nil", runningApplication.bundleIdentifier ?? "nil")
|
||||||
|
|||||||
Reference in new issue
Block a user