Open macrael opened 5 years ago
From what a cursory review of the Quartz CGWindow functions shows, this isn't readily available... you could do something like the following to get it from orderedWindows:
index = hs.fnutils.indexOf(hs.window.orderedWindows(), windowObjectThatICareAbout)
where windowObjectThatICareAbout
is the userdata object representing the window you are interested in.
Thanks, if it's not possible it's not possible. It looks like -[NSWindow orderedIndex] might have it but if you are only interacting with CGWindow then that's that.
Most of the NSWindow
methods only work on your own application's windows, but there are a few exceptions using undocumented (private) API functions and sometimes they can be accessed through the Accessibility interface (AXUIElement)... this gives me a starting point, so I'll see what I can come up with... it will probably be a few days before I can do any real digging, but let's leave this open for now.
That makes sense. Thanks.
With orderedWindows you can get a list of all the windows in order but there is no way to just inspect the z index of a single window.