Skip to content

Commit

Permalink
fix: app would sometimes crash (closes #4244)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Feb 21, 2025
1 parent ee010de commit d543393
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api-wrappers/AXUIElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ extension AXUIElement {
/// with only normal approach: we miss other-Spaces windows
/// with only brute-force approach: we miss windows when the app launches (e.g. launch Note.app: first window is not found by brute-force)
func allWindows(_ pid: pid_t) throws -> [AXUIElement] {
let aWindows = try! windows()
let aWindows = try windows()
let bWindows = AXUIElement.windowsByBruteForce(pid)
return Array(Set(aWindows + bWindows))
}
Expand Down

0 comments on commit d543393

Please sign in to comment.