Kiosk Mode for secondary window


#1

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",
				  Colours::lightgrey,
				  4,
				  true)
{
	windowBounds = new ComponentBoundsConstrainer();
	windowBounds->setFixedAspectRatio(912.0 / 650.0);
    windowBounds->setMinimumWidth(400);
	this->setConstrainer(windowBounds);
	centreWithSize (912, 650);
	setResizable(true, true);
	helpVidComp = new HelpVideoComponent(deviceManager);
	setUsingNativeTitleBar(true);
	setContentOwned (helpVidComp, true);
	setVisible(true);
	enterModalState();
	
}

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());
	resized();
}

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?


#2

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.


#3

That worked. Thanks.