Skip to content

Commit

Permalink
Simplified & removed logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rxhanson committed Sep 28, 2023
1 parent df2f102 commit b52462d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Rectangle/AccessibilityElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,11 @@ extension AccessibilityElement {
}

private static func getWindowInfo(_ location: CGPoint) -> WindowInfo? {
let infoAtLocation = WindowUtil.getWindowList().first(where: {windowInfo in
WindowUtil.getWindowList().first(where: {windowInfo in
windowInfo.level < 23 // 23 is the level of the Notification Center
&& !["Dock", "WindowManager"].contains(windowInfo.processName)
&& windowInfo.frame.contains(location)
})

if let infoAtLocation {
Logger.log("Window found at \(location): \(infoAtLocation)")
} else {
Logger.log("Unable to obtain window info from location")
}

return infoAtLocation
}

static func getWindowElementUnderCursor() -> AccessibilityElement? {
Expand Down

0 comments on commit b52462d

Please sign in to comment.