Reputation: 6247
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.
Upvotes: 3
Views: 1572
Reputation: 46030
You're looking for the Quartz Window Services (CGWindow
) API, specifically the function CGWindowListCopyWindowInfo()
.
Upvotes: 4