| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I'm trying to integrate some Cocoa windows into my Carbon application. I find that there is some kind of window level mismatch between floating windows in the two environments. For example by default, floating Cocoa windows appear above modal Carbon windows. I've been playing with the window level features of window groups but all window levels appear to be zero. For example, if I call DebugPrintAllWindowGroups() I get the following:
Window group tree
----------------------------------------------------------------------- --------
1 level 0 group 0x7610C03F "com.apple.hitoolbox.windowgroups.root"
2 level 0 group 0x7610C60F "com.apple.HIToolbox.windowgroups.floating"
3 level 0 group 0x72C345BF "com.apple.HIToolbox.windowgroups.document"
I could set the window levels of the standard window groups during initialization and set the level of Cocoa windows as I create them. For example:
SetWindowGroupLevel(GetWindowGroupOfClass(kDocumentWindowClass), kCGNormalWindowLevel); SetWindowGroupLevel(GetWindowGroupOfClass(kFloatingWindowClass), kCGFloatingWindowLevel); SetWindowGroupLevel(GetWindowGroupOfClass(kModalWindowClass), kCGModalPanelWindowLevelKey);
and
[myWindow setLevel:NSNormalWindowLevel];
[myWindow setLevel:NSFloatingWindowLevel];
Is this a reasonable thing to do or will this bite me somewhere down the road?
| References: | |
| >Matching Cocoa Window Levels in Carbon (From: Nick Nallick <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.