1
0
Fork 0

Disable fullscreen mode for QT Launcher window by using --disable-fullscreen option

This commit is contained in:
Roman Ludwicki 2023-09-13 20:48:05 +02:00 committed by James Turner
parent fcd88ac845
commit 3711e23a0d

View file

@ -136,8 +136,15 @@ LauncherController::LauncherController(QObject *parent, QWindow* window) :
if (settings.contains("window-state")) {
const auto ws = static_cast<Qt::WindowState>(settings.value("window-state").toInt());
const auto options = flightgear::Options::sharedInstance();
if (ws == Qt::WindowState::WindowFullScreen && options->isBoolOptionDisable("fullscreen")) {
// Last time we used fullscreen, but now we explicitly turn off fullscreen
m_window->setWindowState(Qt::WindowState::WindowNoState);
}
else {
m_window->setWindowState(ws);
}
}
// count launches; we use this to trigger first-run and periodic notices
// in the UI.