From 6790239ef28335c337a306a27d85bf0e30583b27 Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Wed, 29 Dec 2010 09:29:25 +0000 Subject: [PATCH] Fix for mac kiosk modes. --- juce_amalgamated.cpp | 3 ++- src/native/mac/juce_mac_NSViewComponentPeer.mm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 26d4f4b5ec..f5bf722d8c 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -272485,7 +272485,8 @@ void juce_setKioskComponent (Component* kioskModeComponent, bool enableOrDisable #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 if (enableOrDisable) { - [NSApp setPresentationOptions: NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar]; + [NSApp setPresentationOptions: (allowMenusAndBars ? (NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar) + : (NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar))]; kioskModeComponent->setBounds (Desktop::getInstance().getMainMonitorArea (false)); } else diff --git a/src/native/mac/juce_mac_NSViewComponentPeer.mm b/src/native/mac/juce_mac_NSViewComponentPeer.mm index 731f781e86..5304a8896e 100644 --- a/src/native/mac/juce_mac_NSViewComponentPeer.mm +++ b/src/native/mac/juce_mac_NSViewComponentPeer.mm @@ -1662,7 +1662,8 @@ void juce_setKioskComponent (Component* kioskModeComponent, bool enableOrDisable #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 if (enableOrDisable) { - [NSApp setPresentationOptions: NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar]; + [NSApp setPresentationOptions: (allowMenusAndBars ? (NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar) + : (NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar))]; kioskModeComponent->setBounds (Desktop::getInstance().getMainMonitorArea (false)); } else