Skip to content

Commit

Permalink
fix: compare correctly since pid can go away when an app dies
Browse files Browse the repository at this point in the history
  • Loading branch information
louis.pontoise authored and lwouis committed Mar 10, 2020
1 parent 5877f34 commit 4ded030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alt-tab-macos/logic/Application.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private func eventApplicationActivated(_ app: App, _ element: AXUIElement) {

private func eventApplicationHiddenOrShown(_ app: App, _ element: AXUIElement, _ type: String) {
for window in Windows.list {
guard window.application.axUiElement!.pid() == element.pid() else { continue }
guard CFEqual(window.application.axUiElement!, element) else { continue }
window.isHidden = type == kAXApplicationHiddenNotification
}
app.refreshOpenUi()
Expand Down

0 comments on commit 4ded030

Please sign in to comment.