3
votes

Press Cmd + Shift + 4 + Space and start roaming around the screen. It determines which window I'm over and highlights it. I suppose it asks every window about its size and position. How to do the same thing from my own Cocoa app? Determine the window under the cursor and ask about its different parameters? Thanks.

1

1 Answers

4
votes

You're looking for the Quartz Window Services (CGWindow) API, specifically the function CGWindowListCopyWindowInfo().