21 lines
842 B
Diff
21 lines
842 B
Diff
|
diff --git a/shell/main.cpp b/shell/main.cpp
|
||
|
index 49ea484..0451aea 100644
|
||
|
--- a/shell/main.cpp
|
||
|
+++ b/shell/main.cpp
|
||
|
@@ -130,9 +130,15 @@ int main(int argc, char *argv[])
|
||
|
|
||
|
auto disableSessionManagement = [](QSessionManager &sm) {
|
||
|
sm.setRestartHint(QSessionManager::RestartNever);
|
||
|
+#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
|
||
|
+ sm.setAutoCloseWindowsEnabled(false);
|
||
|
+#endif
|
||
|
};
|
||
|
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
|
||
|
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
|
||
|
+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||
|
+ QGuiApplication::setFallbackSessionManagementEnabled(false);
|
||
|
+#endif
|
||
|
|
||
|
ShellManager::s_crashes = cliOptions.value(crashOption).toInt();
|
||
|
ShellManager::s_forceWindowed = cliOptions.isSet(winOption);
|