Change window level

Hi all,

I’m not sure if I’m writing in the right place, but I’ll give it a try…

I need to change the windows level for an OF application ( macosx - of 0.6 ).

The app has to launch in fullscreen at the same level than would have a screensaver, because sometimes the application should launch when an other app is already in fullscreen mode ( yes, It’s kind of freak ).

I’m not really aware of Cocoa stuff, but I understand I would need to set the windows level as NSScreenSaverWindowLevel.

Anyone knows how to achieve this ?

Help would be really appreciated,


I just tried this (actually the opposite direction), based on this:…-cglutfix.m

my code is here:…

(I am lowering the window level, but you can raise it, as in the above .m code). you can modify #define RealSaverLevel, to the higher level in the above .m code (which is for screensavers).

it required the appKit framework added to OF…

hope that helps!

Hi Zach!

That piece of code just saved my life!

I had really a lot of problems ( flickering, no focus etc… )…

How could I know that

// The standard ScreenSaverView class actually sets the window
// level to 2002, not the 1000 defined by NSScreenSaverWindowLevel
// and kCGScreenSaverWindowLevel

Never read that in the cocoa dev docs !

Thanks you a lot! Totally awesome.