On May 25, 2005, at 2:25 PM, Evan Olcott wrote:
On May 25, 2005, at 4:08 PM, Luke Bellandi wrote:
With this code, I can get the carbon windows to not act deactivated, but apparently there's another trick so that the *Cocoa* window doesn't appear (or become) deactivated. Any one know what that one is?
Use NSPanel instead (subclasses NSWindow.) Create the NSPanel with NSNonactivatingPanelMask, which is also available as an option in Interface Builder's attributes inspector.
- Luke
Indeed this is what I am doing for my Cocoa hosting window (double-checked it in IB). I have other "non-activating NSPanels" in my app, so there are times where the AU hosting window *should* become inactive, just not from it's child carbon window click...
Should the carbon child window I'm building have any special settings in IB perhaps?
No. AU Lab creates its window programmatically, but there are no special settings involved in its setup.
Poking around, it seems to be the difference between being able to become the "key window". Cocoa docs says if a window doesn't have a title bar or a resize bar, it can't become key - this carbon window DOESN'T but CAN.
Yes, that's the case in AULab as well. But in re-reading the sentence above, it's applying Cocoa documentation to Carbon objects. While there are a great deal of similarities between the two, they are not one and the same
AULab isn't using an NSPanel, is it? It's got a big titlebar!?
Actually, NSPanels default appearance is exactly like NSWindow's. Note NSUtilityWindowMask from NSPanel.h is the constant used to indicate a thin title bar for a utility panel. That thin title bar is strictly cosmetic. While any on-screen-window that has a thin titlebar is an NSPanel, not all NSPanels have thin titlebars.
- Luke
Ev
Technical Knowledge Officer
Head Programmer/Designer
Audiofile Engineering