What is the equivalent Cocoa window level of Carbon kUtilityWindowClass?

  • Hi,

    I am working on a cocoa application that creates both normal cocoa windows and cocoa windows that are initialized with carbon windows. All windows should be floating above all applications. For the cocoa windows i set the window level to NSTornOffMenuWindowLevel, and for the carbon windows i use kUtilityWindowClass. Both works fine, windows are floating above other applications, but the problem is that carbon and cocoa windows don't have the same window level, so carbon windows will always float on top of cocoa windows. is there a way of giving both window types the same window level without loosing the floating above other apps? i guess since kUtilityWindowClass seems to the only window class which enables floating about other apps in carbon, i am looking for its equivalent in cocoa...

    thanks,
    volker
  • On Jul 19, 2012, at 3:47 PM, Volker Schumacher wrote:

    > I am working on a cocoa application that creates both normal cocoa windows and cocoa windows that are initialized with carbon windows. All windows should be floating above all applications. For the cocoa windows i set the window level to NSTornOffMenuWindowLevel, and for the carbon windows i use kUtilityWindowClass. Both works fine, windows are floating above other applications, but the problem is that carbon and cocoa windows don't have the same window level, so carbon windows will always float on top of cocoa windows. is there a way of giving both window types the same window level without loosing the floating above other apps? i guess since kUtilityWindowClass seems to the only window class which enables floating about other apps in carbon, i am looking for its equivalent in cocoa…

    Use an NSPanel and set it to be floating (-[NSPanel setFloatingPanel:]).  If you must use a window level, I would think that NSFloatingWindowLevel be correspond to a utility window.  (You'd also want to use NSUtilityWindowMask in the style mask.)

    Cheers,
    Ken
previous month july 2012 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today