Search code examples
cocoamacosmacos-carbon

How to set the order of window?


I am looking for API to set order of window on OSX. Something like system does when we click on different windows of same application. API which system uses to set application's windows order or update the order.

Thank you


Solution

  • I don't think there's a public API to set the window order system-wide, but folks have reverse-engineered CoreGraphics' private calls. Look here for CGSPrivate.h and CGSOrderWindow might be what you need.

    http://code.google.com/p/undocumented-goodness/source/browse/trunk/CoreGraphics/CGSPrivate.h

    As folks insist that I mention lately, using private APIs means you can't participate in the App Store.