-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
How would I find the topmost window at a point?
Here's the code I have, but I'm not sure how to figure out which window is on top.
I don't see any references to z-index in the existing or planned API docs.
import Cocoa
import Swindler
import PromiseKit
let currentCursor = NSEvent.mouseLocation
print(currentCursor)
let _ = Swindler.initialize()
.done { state -> Void in
print(
state.knownWindows.filter({
window in
guard window.isMinimized.value else { return false }
return window.frame.value.contains(currentCursor)
}))
exit(0)
}.catch { error in
print(error)
}
CFRunLoopRun()
Metadata
Metadata
Assignees
Labels
No labels