Kiosk mode and window presentation options issue


#1

Issue: Window presentation options (i.e. the allowMenusAndBars argument in setKioskModeComponent) is not honoured once focus is lost from the window.

Affects: JUCE master tip 39bba51 7/12/15

Environment: OSX 10.10.5 Yosemite. Macbook Pro 15" Retina Mid-2014

Steps:

  1. Modify JUCE demo 'goToKioskMode' Command+F shortcut to accept false for the allowMenusAndBars argument in setKioskModeComponent()
  2. Launch JUCE demo, press Command + F. Move your cursor to the top and bottom of the screen and notice how the OSX menu bar and dock does not show.
  3. Switch from the full screen JUCE demo to another space by pressing contol + left/right arrow. Then switch back to the JUCE demo the same way. Move your cursor to the top and bottom of the screen and notice how the OSX menu bar and dock now shows up.

Information: It seems whenever focus is lost the 'NSApplicationPresentationOptions' get reset to NSApplicationPresentationDefault, thus losing the value of 'NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar' which was set in setKioskComponent in response to allowMenusAndBars = false. I have worked around this issue by saving the allowMenusAndBars value and setting the presentation options everytime we regain focus.