Real Fullscreen Mode

Hey All,

I’m just starting out with JUCE, and I am really impressed. Seems simple and clean, and very Java-like in a sense, so I feel already at home. And the widgets are really nice looking!

I had a q though. In the forum I saw a couple of posts about “kiosk mode”, but nothing seemed to come out of it. I would really like for JUCE to have a real fullscreen mode: No taskbars or menu bars, no dock, and control over the native resolution (i.e. the program should change the resolution of the current monitor or monitors). This would really be great for A/V applications, such as VJ stuff and the like, in addition to more traditional kiosk-style applications. In Java this is called Full Screen Exclusive mode, or something like that.

I managed to simulate this on a second monitor, by making an undecorated window that fit the current display resolution, but sometimes this isn’t available. Real full screen would be really great, and far less hacky.

thanks,

c.

I’ve made an app that does exactly this. It’s more involved than a single method call, but it can be done with a fairly minimal amount of complexity without any modification to Juce. Unfortunately, I can’t seem to find the source for it right now, but if I do, I can post it here.

Edit: found it, here’s the relevant code. Note that there’s no DocumentWindow at all, just a Component which has the full screen as its bounds.

class JUCEHelloWorldApplication : public JUCEApplication
{
	HelloWorldContentComponent* helloWorldComp;
public:
    //==============================================================================
    JUCEHelloWorldApplication()
        : helloWorldComp (0)
    {
    }

    ~JUCEHelloWorldApplication()
    {
    }

    void initialise (const String& commandLine)
    {
        helloWorldComp = new HelloWorldContentComponent();
        helloWorldComp->setOpaque(true);
        helloWorldComp->addToDesktop(ComponentPeer::windowAppearsOnTaskbar);
        helloWorldComp->setVisible (true);
        helloWorldComp->setBounds(Desktop::getInstance().getMainMonitorArea(false));
        helloWorldComp->toFront(true);
    }
...
};
1 Like

is it cross-platform?

I haven’t tried it on any other platforms besides Windows. I suspect it would work on Linux, but OS X may not like it.

yup, seems like OS X doesn’t like it. The menu bar is still there. I’ll test more tomorrow.

thanks