diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index f9f3ee5c4e..8bf44d2918 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -371,12 +371,7 @@ public: bool isKioskMode() const override { - #if defined (MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 - if (hasNativeTitleBar() && ([window styleMask] & NSWindowStyleMaskFullScreen) != 0) - return true; - #endif - - return ComponentPeer::isKioskMode(); + return isWindowInKioskMode || ComponentPeer::isKioskMode(); } static bool isWindowAtPoint (NSWindow* w, NSPoint screenPoint) @@ -441,10 +436,18 @@ public: { if (hasNativeTitleBar()) { + #if defined (MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + isWindowInKioskMode = (([window styleMask] & NSWindowStyleMaskFullScreen) != 0); + #endif + auto screen = getFrameSize().subtractedFrom (component.getParentMonitorArea()); fullScreen = component.getScreenBounds().expanded (2, 2).contains (screen); } + else + { + isWindowInKioskMode = false; + } } bool hasNativeTitleBar() const @@ -1353,6 +1356,7 @@ public: NSWindow* window = nil; NSView* view = nil; bool isSharedWindow = false, fullScreen = false; + bool isWindowInKioskMode = false; #if USE_COREGRAPHICS_RENDERING bool usingCoreGraphics = true; #else diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index 9a344f8a92..ce65b4adfd 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -143,7 +143,10 @@ public: } //============================================================================== - void paint (Graphics&) override {} + void paint (Graphics&) override + { + updateViewportSize (false); + } bool invalidateAll() override { @@ -229,8 +232,6 @@ public: if (shouldExit()) return false; - - updateViewportSize (false); } if (! context.makeActive())