parent
162d505052
commit
ea1e1e4423
@ -1,170 +0,0 @@
|
|||||||
From da34fd073f6b361fde1fdcee559d60e8c0268cd6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Edmundson <kde@davidedmundson.co.uk>
|
|
||||||
Date: Sat, 7 Nov 2020 23:52:12 +0000
|
|
||||||
Subject: [PATCH] Revert "Use new simpler way to disable session management in
|
|
||||||
services"
|
|
||||||
|
|
||||||
The two ways of disabling session management have the same impact on the
|
|
||||||
session being saved, but there is one behavioural side-effect that
|
|
||||||
turned out to be less ideal.
|
|
||||||
|
|
||||||
By disabling completely we don't follow the session manager telling the
|
|
||||||
application to quit. That's not something needed with the systemd boot,
|
|
||||||
but for the legacy boot effectively we were just closing applications by
|
|
||||||
ripping the X connection away from under them.
|
|
||||||
|
|
||||||
Some applications are bad at handling this and this led to a bunch of
|
|
||||||
crashes or dangling processes at logout.
|
|
||||||
|
|
||||||
This reverts commit 9be7dedb87ea574916f0f8a2837eaf7b19a7a166.
|
|
||||||
|
|
||||||
CCBUG: 424408
|
|
||||||
|
|
||||||
|
|
||||||
(cherry picked from commit 9e641d41717911f835fba59eb5fab6bbf97f8502)
|
|
||||||
---
|
|
||||||
gmenu-dbusmenu-proxy/main.cpp | 8 +++++++-
|
|
||||||
krunner/main.cpp | 10 +++++++++-
|
|
||||||
shell/main.cpp | 10 +++++++++-
|
|
||||||
xembed-sni-proxy/main.cpp | 8 +++++++-
|
|
||||||
4 files changed, 32 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gmenu-dbusmenu-proxy/main.cpp b/gmenu-dbusmenu-proxy/main.cpp
|
|
||||||
index 632321289..cd32b10f6 100644
|
|
||||||
--- a/gmenu-dbusmenu-proxy/main.cpp
|
|
||||||
+++ b/gmenu-dbusmenu-proxy/main.cpp
|
|
||||||
@@ -18,6 +18,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QGuiApplication>
|
|
||||||
+#include <QSessionManager>
|
|
||||||
|
|
||||||
#include <KWindowSystem>
|
|
||||||
|
|
||||||
@@ -28,7 +29,6 @@ int main(int argc, char ** argv)
|
|
||||||
qputenv("QT_QPA_PLATFORM", "xcb");
|
|
||||||
|
|
||||||
QGuiApplication::setDesktopSettingsAware(false);
|
|
||||||
- QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
|
|
||||||
|
|
||||||
QGuiApplication app(argc, argv);
|
|
||||||
|
|
||||||
@@ -36,6 +36,12 @@ int main(int argc, char ** argv)
|
|
||||||
qFatal("qdbusmenuproxy is only useful XCB. Aborting");
|
|
||||||
}
|
|
||||||
|
|
||||||
+ auto disableSessionManagement = [](QSessionManager &sm) {
|
|
||||||
+ sm.setRestartHint(QSessionManager::RestartNever);
|
|
||||||
+ };
|
|
||||||
+ QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
|
|
||||||
+ QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
|
|
||||||
+
|
|
||||||
app.setQuitOnLastWindowClosed(false);
|
|
||||||
|
|
||||||
MenuProxy proxy;
|
|
||||||
diff --git a/krunner/main.cpp b/krunner/main.cpp
|
|
||||||
index cbf0dff83..bbf20743e 100644
|
|
||||||
--- a/krunner/main.cpp
|
|
||||||
+++ b/krunner/main.cpp
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#include <QUrl>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QQuickWindow>
|
|
||||||
+#include <QSessionManager>
|
|
||||||
#include <QDBusMessage>
|
|
||||||
#include <QDBusConnection>
|
|
||||||
|
|
||||||
@@ -41,7 +42,6 @@
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
QCommandLineParser parser;
|
|
||||||
- QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
|
|
||||||
if (!qEnvironmentVariableIsSet("PLASMA_USE_QT_SCALING")) {
|
|
||||||
qunsetenv("QT_DEVICE_PIXEL_RATIO");
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
|
|
||||||
@@ -93,6 +93,14 @@ int main(int argc, char **argv)
|
|
||||||
|
|
||||||
KDBusService service(KDBusService::Unique | KDBusService::StartupOption(parser.isSet(replaceOption) ? KDBusService::Replace : 0));
|
|
||||||
|
|
||||||
+ QGuiApplication::setFallbackSessionManagementEnabled(false);
|
|
||||||
+
|
|
||||||
+ auto disableSessionManagement = [](QSessionManager &sm) {
|
|
||||||
+ sm.setRestartHint(QSessionManager::RestartNever);
|
|
||||||
+ };
|
|
||||||
+ QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
|
|
||||||
+ QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
|
|
||||||
+
|
|
||||||
View view;
|
|
||||||
|
|
||||||
auto updateVisibility = [&]() {
|
|
||||||
diff --git a/shell/main.cpp b/shell/main.cpp
|
|
||||||
index 1000b5a97..d82993271 100644
|
|
||||||
--- a/shell/main.cpp
|
|
||||||
+++ b/shell/main.cpp
|
|
||||||
@@ -21,6 +21,7 @@
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QCommandLineParser>
|
|
||||||
#include <QQuickWindow>
|
|
||||||
+#include <QSessionManager>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QProcess>
|
|
||||||
#include <QMessageBox>
|
|
||||||
@@ -83,7 +84,6 @@ int main(int argc, char *argv[])
|
|
||||||
} else {
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
|
||||||
}
|
|
||||||
- QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
|
|
||||||
|
|
||||||
QQuickWindow::setDefaultAlphaBuffer(true);
|
|
||||||
|
|
||||||
@@ -162,6 +162,14 @@ int main(int argc, char *argv[])
|
|
||||||
cliOptions.process(app);
|
|
||||||
aboutData.processCommandLine(&cliOptions);
|
|
||||||
|
|
||||||
+ QGuiApplication::setFallbackSessionManagementEnabled(false);
|
|
||||||
+
|
|
||||||
+ auto disableSessionManagement = [](QSessionManager &sm) {
|
|
||||||
+ sm.setRestartHint(QSessionManager::RestartNever);
|
|
||||||
+ };
|
|
||||||
+ QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
|
|
||||||
+ QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
|
|
||||||
+
|
|
||||||
ShellCorona* corona = new ShellCorona(&app);
|
|
||||||
corona->setShell(cliOptions.value(shellPluginOption));
|
|
||||||
|
|
||||||
diff --git a/xembed-sni-proxy/main.cpp b/xembed-sni-proxy/main.cpp
|
|
||||||
index 05fd6bf32..8b0078234 100644
|
|
||||||
--- a/xembed-sni-proxy/main.cpp
|
|
||||||
+++ b/xembed-sni-proxy/main.cpp
|
|
||||||
@@ -19,6 +19,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QGuiApplication>
|
|
||||||
+#include <QSessionManager>
|
|
||||||
|
|
||||||
#include "fdoselectionmanager.h"
|
|
||||||
|
|
||||||
@@ -41,7 +42,6 @@ int main(int argc, char ** argv)
|
|
||||||
qputenv("QT_QPA_PLATFORM", "xcb");
|
|
||||||
|
|
||||||
QGuiApplication::setDesktopSettingsAware(false);
|
|
||||||
- QCoreApplication::setAttribute(Qt::AA_DisableSessionManager);
|
|
||||||
|
|
||||||
QGuiApplication app(argc, argv);
|
|
||||||
|
|
||||||
@@ -49,6 +49,12 @@ int main(int argc, char ** argv)
|
|
||||||
qFatal("xembed-sni-proxy is only useful XCB. Aborting");
|
|
||||||
}
|
|
||||||
|
|
||||||
+ auto disableSessionManagement = [](QSessionManager &sm) {
|
|
||||||
+ sm.setRestartHint(QSessionManager::RestartNever);
|
|
||||||
+ };
|
|
||||||
+ QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement);
|
|
||||||
+ QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement);
|
|
||||||
+
|
|
||||||
app.setQuitOnLastWindowClosed(false);
|
|
||||||
|
|
||||||
qDBusRegisterMetaType<KDbusImageStruct>();
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
|||||||
SHA512 (breeze-fedora-0.2.tar.gz) = ff800e686b0dcb498f321bb94d3a8274c89c092f5408ef1ec3fc65333f046aea43444144ecaf166792f807014383af87b1180dc7540905fc10dc375309f8b2a8
|
SHA512 (breeze-fedora-0.2.tar.gz) = ff800e686b0dcb498f321bb94d3a8274c89c092f5408ef1ec3fc65333f046aea43444144ecaf166792f807014383af87b1180dc7540905fc10dc375309f8b2a8
|
||||||
SHA512 (plasma-workspace-5.20.3.tar.xz) = c1daa19834ea7997a8e44fcb6ce9745d5bac56a0a4d99320e1e3e42e9cb5489aa36887e3c2bd8e385644d555d355211c9dba6c40edf2471478566c531a2d9c89
|
SHA512 (plasma-workspace-5.20.4.tar.xz) = 071ca0073ade4206bd42277114bc2693698cb91c4f448ddbbd56f3430ed0a1946afb474a6b80cb11ee907a5a83fefdde06866c7a887bfbc3456a64b60a6f38e1
|
||||||
|
Loading…
Reference in new issue