Skip to content

Commit

Permalink
fix: show window of some apps like jetbrains apps (#1249 #1079 #1392)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
metacodes authored and lwouis committed Apr 7, 2022
1 parent 6887291 commit 0b85b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logic/Application.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 0b85b09

Please sign in to comment.