diff --git a/src/mixxx.cpp b/src/mixxx.cpp index 7d8519feb1c..818c6781842 100644 --- a/src/mixxx.cpp +++ b/src/mixxx.cpp @@ -699,7 +699,23 @@ void MixxxMainWindow::finalize() { m_pTrackCollectionManager->stopLibraryScan(); m_pLibrary->stopPendingTasks(); - // Save the current window state (position, maximized, etc) + // Save the current window state (position, maximized, etc) + // Note(ronso0): Unfortunately saveGeometry() also stores the fullscreen state. + // On next start restoreGeometry would enable fullscreen mode even though that + // might not be requested (no '--fullscreen' command line arg and + // [Config],StartInFullscreen is '0'. + // https://bugs.launchpad.net/mixxx/+bug/1882474 + // https://bugs.launchpad.net/mixxx/+bug/1909485 + // So let's quit fullscreen if StartInFullscreen is not checked in Preferences. + bool fullscreenPref = m_pSettingsManager->settings()->getValue( + ConfigKey("[Config]", "StartInFullscreen")); + if (isFullScreen() && !fullscreenPref) { + slotViewFullScreen(false); + // After returning from fullscreen the main window incl. window decoration + // may be too large for the screen. + // Maximize the window so we can store a geometry that fits the screen. + showMaximized(); + } m_pSettingsManager->settings()->set(ConfigKey("[MainWindow]", "geometry"), QString(saveGeometry().toBase64())); m_pSettingsManager->settings()->set(ConfigKey("[MainWindow]", "state"), diff --git a/src/preferences/dialog/dlgprefinterface.cpp b/src/preferences/dialog/dlgprefinterface.cpp index 1db6f9a7c5a..40c0f2b0e49 100644 --- a/src/preferences/dialog/dlgprefinterface.cpp +++ b/src/preferences/dialog/dlgprefinterface.cpp @@ -73,10 +73,7 @@ DlgPrefInterface::DlgPrefInterface(QWidget * parent, MixxxMainWindow * mixxx, m_bRebootMixxxView(false) { setupUi(this); - // // Locale setting - // - // Iterate through the available locales and add them to the combobox // Borrowed following snippet from http://qt-project.org/wiki/How_to_create_a_multi_language_application QString translationsFolder = m_pConfig->getResourcePath() + "translations/"; @@ -161,15 +158,11 @@ DlgPrefInterface::DlgPrefInterface(QWidget * parent, MixxxMainWindow * mixxx, spinBoxScaleFactor->hide(); labelScaleFactor->hide(); - // // Start in fullscreen mode - // checkBoxStartFullScreen->setChecked(m_pConfig->getValueString( ConfigKey("[Config]", "StartInFullscreen")).toInt()==1); - // // Screensaver mode - // comboBoxScreensaver->clear(); comboBoxScreensaver->addItem(tr("Allow screensaver to run"), static_cast(mixxx::ScreenSaverPreference::PREVENT_OFF)); @@ -181,10 +174,7 @@ DlgPrefInterface::DlgPrefInterface(QWidget * parent, MixxxMainWindow * mixxx, int inhibitsettings = static_cast(mixxx->getInhibitScreensaver()); comboBoxScreensaver->setCurrentIndex(comboBoxScreensaver->findData(inhibitsettings)); - // // Tooltip configuration - // - // Initialize checkboxes to match config loadTooltipPreferenceFromConfig(); slotSetTooltips(); // Update disabled status of "only library" checkbox