From b08602e83b55a86b0e8cba9f21f3b070739c83a1 Mon Sep 17 00:00:00 2001 From: Jonathan Earnshaw Date: Tue, 24 Nov 2015 12:09:54 +1300 Subject: [PATCH] REVIEW FEATURE: Remember window position & fullscreen mode (VP-2746) REVIEW BUGFIX: Review can be resized to a size where it crashes (VP-1962) * Save and restore review non-fullscreen window state. * Allow review to be started up in windowed mode in OSX. * Fix inconsistent state with kiosk mode. Port of JUCE 3 CODEX modification (7d25d25) to JUCE 4 Change-Id: Ic4ff939be89ee3e126b8f99c654fe9a8031fc92e --- .../juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/juce3/JuceLibraryCode/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/juce3/JuceLibraryCode/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index 27fdb1c..5d83fc2 100644 --- a/juce3/JuceLibraryCode/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/juce3/JuceLibraryCode/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -368,8 +368,14 @@ 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] & NSFullScreenWindowMask) != 0) - return true; + // CODEX: + /* JE: Ensure isKioskMode() returns the correct window state when ComponentPeer has + * a kiosk component set and fullscreen has been exited using the native title bar (VP-1962) */ + if (hasNativeTitleBar()) + return (([window styleMask] & NSFullScreenWindowMask) != 0); +// if (hasNativeTitleBar() && ([window styleMask] & NSFullScreenWindowMask) != 0) +// return true; + // End of CODEX #endif return ComponentPeer::isKioskMode(); -- 2.2.1