Skip to content

Commit

Permalink
enter fullscreen early during startup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed May 8, 2021
1 parent b705802 commit 20e7464
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/mixxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {

Sandbox::setPermissionsFilePath(QDir(pConfig->getSettingsPath()).filePath("sandbox.cfg"));

// Turn on fullscreen mode
// if we were told to start in fullscreen mode on the command-line
// or if the user chose to always start in fullscreen mode.
// Remember to refresh the Fullscreen menu item after connectMenuBar()
bool fullscreenPref = pConfig->getValue<bool>(
ConfigKey("[Config]", "StartInFullscreen"));
if (args.getStartInFullscreen() || fullscreenPref) {
slotViewFullScreen(true);
}

QString resourcePath = pConfig->getResourcePath();

FontUtils::initializeFonts(resourcePath); // takes a long time
Expand Down Expand Up @@ -515,9 +525,10 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {

launchProgress(60);

// Connect signals to the menubar. Should be done before we go fullscreen
// and emit newSkinLoaded.
// Connect signals to the menubar. Should be done before emit newSkinLoaded.
connectMenuBar();
// Refresh the Fullscreen checkbox for the case we went fullscreen earlier
emit fullScreenChanged(isFullScreen());

launchProgress(63);

Expand Down Expand Up @@ -569,15 +580,6 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {
// This allows us to turn off tooltips.
pApp->installEventFilter(this); // The eventfilter is located in this
// Mixxx class as a callback.

// If we were told to start in fullscreen mode on the command-line or if
// user chose always starts in fullscreen mode, then turn on fullscreen
// mode.
bool fullscreenPref = pConfig->getValue<bool>(
ConfigKey("[Config]", "StartInFullscreen"));
if (args.getStartInFullscreen() || fullscreenPref) {
slotViewFullScreen(true);
}
emit skinLoaded();


Expand Down

0 comments on commit 20e7464

Please sign in to comment.