Fullscreen question

Moderator
Posts: 624
Joined: 2007.09
Post: #1
I have the following code.
if ([sender state]==NSOnState){
int windowLevel = CGShieldingWindowLevel();
[fullScreenOut enterFullScreenMode:[NSScreen mainScreen]withOptions:nil];
}
else{
[fullScreenOut exitFullScreenModeWithOptions:nil];
}

My objective(pun intended) is to make it so when my main window goes into fullscreen, my floating window stays on top. I got it to do this using

[HUD setLevel:windowLevel];
[HUD makeKeyAndOrderFront:nil];

but when I click on the main window, my floating window disappears. Any help would be appreciated.

NOTE: fullScreenOut is my main window's content view. HUD is an outlet to my floating window.

- Lincoln Green
http://www.binkworks.com/
Quote this message in a reply
Moderator
Posts: 624
Joined: 2007.09
Post: #2
Tried setting it to NSStatusLevel, but still no go. Any Suggestions? At all?

- Lincoln Green
http://www.binkworks.com/
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
CGShieldingWindowLevel() + 1 is an obvious thing to try. I don't know if this is possible, however.
Quote this message in a reply
Moderator
Posts: 624
Joined: 2007.09
Post: #4
Ah, thought I tried that, but Voila! it works! Youreka! Thank you!

- Lincoln Green
http://www.binkworks.com/
Quote this message in a reply
Post Reply