diff --git a/hi_backend/backend/BackendRootWindow.cpp b/hi_backend/backend/BackendRootWindow.cpp index 445a51b0eb..df656ccd29 100644 --- a/hi_backend/backend/BackendRootWindow.cpp +++ b/hi_backend/backend/BackendRootWindow.cpp @@ -279,15 +279,16 @@ BackendRootWindow::BackendRootWindow(AudioProcessor *ownerProcessor, var editorS const int workspace = editorState.getDynamicObject()->getProperty("CurrentWorkspace"); - +#if JUCE_WINDOWS + auto makeFullScreenOnLaunch = (bool)editorState.getProperty("isFullScreen", false); + getProperties().set("FullScreen", makeFullScreenOnLaunch); +#endif if(workspace > 0) showWorkspace(workspace); setEditor(this); } - - } if (!loadedCorrectly) @@ -759,6 +760,12 @@ void BackendRootWindow::saveInterfaceData() obj->setProperty("Position", position); + if(auto rw = findParentComponentOfClass()) + { + auto isFullScreen = rw->isFullScreen(); + obj->setProperty("isFullScreen", isFullScreen); + } + obj->setProperty("CurrentWorkspace", currentWorkspace); } diff --git a/projects/standalone/Source/Main.cpp b/projects/standalone/Source/Main.cpp index 48050dfd17..aaa21cc1d4 100644 --- a/projects/standalone/Source/Main.cpp +++ b/projects/standalone/Source/Main.cpp @@ -885,7 +885,8 @@ class HISEStandaloneApplication : public JUCEApplication } } - setContentOwned (new MainContentComponent(commandLine), true); + auto mc = new MainContentComponent(commandLine); + setContentOwned (mc, true); #if JUCE_IOS @@ -899,9 +900,10 @@ class HISEStandaloneApplication : public JUCEApplication setUsingNativeTitleBar(true); - - - centreWithSize (getWidth(), getHeight() - 28); + if(mc->makeFullscreenOnLaunch) + setFullScreen(true); + else + centreWithSize (getWidth(), getHeight() - 28); #endif @@ -968,7 +970,7 @@ MainContentComponent::MainContentComponent(const String &commandLine) setSize(editor->getWidth(), editor->getHeight()); - + makeFullscreenOnLaunch = (bool)editor->getProperties()["FullScreen"]; handleCommandLineArguments(commandLine); } diff --git a/projects/standalone/Source/MainComponent.h b/projects/standalone/Source/MainComponent.h index ba26d7bb0d..7862663c85 100644 --- a/projects/standalone/Source/MainComponent.h +++ b/projects/standalone/Source/MainComponent.h @@ -46,6 +46,8 @@ class MainContentComponent : public Component, void requestQuit(); + bool makeFullscreenOnLaunch = false; + private: ScopedPointer editor;