fix: compare correctly since pid can go away when an app dies
This commit is contained in:
1 parent
5877f34fe4
commit
4ded030a35
1 file changed
+1
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user