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.

So it seems Kiosk Mode is always using primary display with exception of useNativeTitleBar (true); under macOS.

would be nice if the JUCE team would change the setKioskComponent to use the actual window screen to make it more useful.
This needed to be changed on macOS / Linux (x11) / Windows.
(with similar code)

kioskComp->setBounds (getDisplays().findDisplayForRect(kioskComp->getBounds()).totalArea);

currently it is using only main display…


Here is a PIP showing how when using native titlebar under mac the Kiosk goes to the fullscreen on the window that display is on while when set to true (and all other platforms) it always uses the MainDisplay.

PIP example code:
KioskMainDisplay.h (2.3 KB)

sorry to bump this. but would be useful to know if you can add this to JUCE or should I just commit it into our fork.