sindresorhus / get-windows

Get metadata about the active window and open windows (title, id, bounds, owner, etc)
MIT License
783 stars 161 forks source link

activeWindow.getOpenWindows() z-index #163

Closed pie6k closed 1 year ago

pie6k commented 1 year ago

I want to build screen capture window picker, where I create invisible overlay and you 'click' on a window you want to record, similar to default screenshot taking on mac, when selecting the window.

It is very likely a few windows occupy the same bounds or overlap each other. In such a case, to know which window you clicked, I need z-index attribute of the window. Is it possible to get it somehow? Or can I treat order of returned windows as their z-index?

sindresorhus commented 1 year ago

Windows are returned in order from front to back.