53 lines
1.8 KiB
Diff
53 lines
1.8 KiB
Diff
From: Andreas Hartmetz <ahartmetz@gmail.com>
|
|
Date: Sat, 20 Feb 2016 20:01:42 +0000
|
|
Subject: Disable fallback session management (requires Qt >= 5.6.0).
|
|
X-Git-Url: http://quickgit.kde.org/?p=plasma-workspace.git&a=commitdiff&h=b5e814a7b2867914327c889794b1088027aaafd6
|
|
---
|
|
Disable fallback session management (requires Qt >= 5.6.0).
|
|
|
|
This prevents processes from dying when session logout is cancelled.
|
|
Session restore is not an issue in these, it's disabled anyway.
|
|
---
|
|
|
|
|
|
--- a/klipper/main.cpp
|
|
+++ b/klipper/main.cpp
|
|
@@ -73,6 +73,9 @@
|
|
|
|
KAboutData::setApplicationData(aboutData);
|
|
|
|
+#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 1)
|
|
+ QGuiApplication::setFallbackSessionManagementEnabled(false);
|
|
+#endif
|
|
auto disableSessionManagement = [](QSessionManager &sm) {
|
|
sm.setRestartHint(QSessionManager::RestartNever);
|
|
};
|
|
|
|
--- a/krunner/main.cpp
|
|
+++ b/krunner/main.cpp
|
|
@@ -66,6 +66,9 @@
|
|
|
|
KAboutData::setApplicationData(aboutData);
|
|
|
|
+#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 1)
|
|
+ QGuiApplication::setFallbackSessionManagementEnabled(false);
|
|
+#endif
|
|
auto disableSessionManagement = [](QSessionManager &sm) {
|
|
sm.setRestartHint(QSessionManager::RestartNever);
|
|
};
|
|
|
|
diff --git a/shell/main.cpp b/shell/main.cpp
|
|
index 49ea484..68cf9e9 100644
|
|
--- a/shell/main.cpp
|
|
+++ b/shell/main.cpp
|
|
@@ -133,6 +133,9 @@ int main(int argc, char *argv[])
|
|
};
|
|
QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
|
|
QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
|
|
+#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 1)
|
|
+ QGuiApplication::setFallbackSessionManagementEnabled(false);
|
|
+#endif
|
|
|
|
ShellManager::s_crashes = cliOptions.value(crashOption).toInt();
|
|
ShellManager::s_forceWindowed = cliOptions.isSet(winOption);
|