Disable fullscreen mode for QT Launcher window by using --disable-fullscreen
option
This commit is contained in:
parent
fcd88ac845
commit
3711e23a0d
1 changed files with 8 additions and 1 deletions
|
@ -136,8 +136,15 @@ LauncherController::LauncherController(QObject *parent, QWindow* window) :
|
||||||
|
|
||||||
if (settings.contains("window-state")) {
|
if (settings.contains("window-state")) {
|
||||||
const auto ws = static_cast<Qt::WindowState>(settings.value("window-state").toInt());
|
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);
|
m_window->setWindowState(ws);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// count launches; we use this to trigger first-run and periodic notices
|
// count launches; we use this to trigger first-run and periodic notices
|
||||||
// in the UI.
|
// in the UI.
|
||||||
|
|
Loading…
Reference in a new issue