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 t开发者_StackOverflowhe cursor and ask about its different parameters? Thanks.
You're looking for the Quartz Window Services (CGWindow
) API, specifically the function CGWindowListCopyWindowInfo()
.
精彩评论