In our application, the user can open a number of small, non-modal windows that “float” around the main application. Each of these windows can be resized, moved, etc. When the user clicks the main application window to bring it to the front, we’d like to also bring the small floating windows to the front.
Is there an event or something that I can track for when “application becomes active”? The equivalent on windows would be the WM_ACTIVATEAPP message, but I’m not sure where to look in Cocoa.
Your application delegate receives
applicationDidBecomeActive:when, um, the application becomes active. If you’re using the default Xcode templates, you should already have an object that is your app delegate.