NSOpenGLFullScreen and SetSystemUIMode freeze bug!?
- by Mattias
Hi! I have a really strange problem which is perfectly re-producable using sample code!
If I use Apple's NSOpenGLFullScreen sample I can click a button to enter fullscreen OpenGL mode. However if I click the mouse in the area where the menubar would be if I was running windowed mode, the entire program freezes because I really activate the menu-choice behind the OpenGL screen, so to speak.
The solution I have found after some Googling is to use SetSystemUIMode to hide the menubar. Also I want to initiate the application to fullscreen at startup by adding a call to EnterFullScreen after initialization. Entering FullScreen works perfectly, BUT - if I add the call to SetSystemUIMode I get a really strange error! The entire screen hangs, the animation stops and no mouse coordinates seem to be reported. If I then exit the Fullscreen mode and press the FullScreen button again everything works and the menubar is gone..
What could be wrong here? I mean it obviously works to remove the menubar in that manner and it obviously works to enter fullscreen mode like that (using Cocoa), but why doesn't the combination work!?
Pleeease help :)
Sincerely, / Mattias