diff --git a/plasma-workspace-5.20.3-fix-crashes-on-logout.patch b/plasma-workspace-5.20.3-fix-crashes-on-logout.patch new file mode 100644 index 0000000..82973c6 --- /dev/null +++ b/plasma-workspace-5.20.3-fix-crashes-on-logout.patch @@ -0,0 +1,170 @@ +From da34fd073f6b361fde1fdcee559d60e8c0268cd6 Mon Sep 17 00:00:00 2001 +From: David Edmundson +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 ++#include + + #include + +@@ -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 + #include + #include ++#include + #include + #include + +@@ -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 + #include + #include ++#include + #include + #include + #include +@@ -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 ++#include + + #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(); +-- +GitLab + diff --git a/plasma-workspace.spec b/plasma-workspace.spec index 62e837e..6dad202 100644 --- a/plasma-workspace.spec +++ b/plasma-workspace.spec @@ -16,7 +16,7 @@ Name: plasma-workspace Summary: Plasma workspace, applications and applets Version: 5.20.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://cgit.kde.org/%{name}.git @@ -61,6 +61,8 @@ Patch106: plasma-workspace-5.18.4.1-filter-environment-v2.patch ## upstream Patches lookaside cache ## upstream Patches (master branch) +# https://bugzilla.redhat.com/show_bug.cgi?id=1861700 +Patch200: plasma-workspace-5.20.3-fix-crashes-on-logout.patch # udev BuildRequires: zlib-devel @@ -407,6 +409,7 @@ BuildArch: noarch %setup -q -a 20 ## upstream patches +%patch200 -p1 %patch100 -p1 -b .konsole-in-contextmenu # FIXME/TODO: it is unclear whether this is needed or even a good idea anymore -- rex @@ -705,6 +708,9 @@ desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.{klipper, %changelog +* Sun Nov 15 15:23:57 CET 2020 Vitaly Zaitsev - 5.20.3-2 +- Backported patch with crash fix on logout (#1861700). + * Wed Nov 11 08:22:42 CET 2020 Jan Grulich - 5.20.3-1 - 5.20.3