Is there a way to get list of open or visible NSWindow from mac desktop?
Cocoa – How to get a list of all open NSWindow from all running application
cocoanswindow
cocoanswindow
Is there a way to get list of open or visible NSWindow from mac desktop?
Best Answer
Note that not all windows are necessarily
NSWindows
, and thatNSWindow
only provides an interface to windows in your own address space.The supported way to access every window is the
CGWindow
API. Take a look at the Son of Grab sample code to see how it's done.