Kiosk Mode for secondary window


My app includes help videos that pop up in a secondary, modal window that uses the native title bar. I want them to be able to watch the video full screen by going into Kiosk Mode. This used to work just fine, but now I can only get it to work when using the JUCE title bar, which doesn’t allow me to go full screen without the title bar like native does. I’m using Mac OS 10.7.5 I’ve set it up like this:
Pop up Window Constructor:

HelpVideoWindow::HelpVideoWindow(AudioDeviceManager& deviceManager)
: DocumentWindow ("Video Viewer",
	windowBounds = new ComponentBoundsConstrainer();
	windowBounds->setFixedAspectRatio(912.0 / 650.0);
	centreWithSize (912, 650);
	setResizable(true, true);
	helpVidComp = new HelpVideoComponent(deviceManager);
	setContentOwned (helpVidComp, true);

Then when someone presses the “full” button in HelpVideoComponent…

void HelpVideoComponent::fullScreen()
	HelpVideoWindow* helpWindow = findParentComponentOfClass <HelpVideoWindow>();
	Desktop::getInstance().setKioskModeComponent(helpWindow, true);
	setBounds(0, 0, helpWindow->getWidth(), helpWindow->getHeight());

But nothing happens. I’ve tried:

  1. using DocumentWindow, ResizableWindow, and DialogWindow.
  2. Getting rid of the bounds constrainer
  3. Not going modal

Is this functionality just not supported in JUCE anymore, or am I doing something wrong?


The kiosk-mode stuff will make a component full-screen, but it just treats it as a Component, it won’t do anything special for a DialogWindow, and DialogWindow itself has no way to remove its title bar. You’d need to just put your content component directly on the desktop and make that the kiosk comp.


That worked. Thanks.