so I made the following change:
bool NSViewComponentPeer::isFullScreen() const
if ([window styleMask] & NSFullScreenWindowMask) //added by Me
else return fullScreen;
I was trying to use the getKioskModeComponent to find out if we are in fullscreen, but apparently, the kioskModeComponent is not set when user press the fullscreen button on the title bar.
Seriously?? A naive change like that would break all kinds of unrelated code that relies on the current behaviour of isFullScreen()!
Just kidding. A better to get the fullscreen state is:
void* nsview = window.getPeer()->getNativeHandle
NSView* view = (NSView*)nsview;
bool fullscreen = [view.window styleMask] & NSFullScreenWindowMask;
But anyway, we should setup enter/leave fullscreen notification in order to catch the chance to set kioskModeComponent properly. So we can just use getKioskModeComponent to get the current fullscreen state.
Yes, that makes more sense!
Has something like this been done already? I was pleasantly surprised to see that Lion fullscreen app mode is just working with the latest version of Juce. I’m now looking at how to best coordinate that with a toolbar button that previously used kiosk mode.