From 5e2c77776c8d7018a8a8a17819142198ec6711fa Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 18 Sep 2024 21:52:40 +0200 Subject: [PATCH] backport upstream patch to fix session restore on wayland (https://bugs.kde.org/show_bug.cgi?id=436318 ) [release 6.1.5-2mamba;Wed Sep 18 2024] --- ...t-fix_wayland_session_restore_saving.patch | 39 +++++++++++++++++++ plasma-workspace.spec | 7 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 plasma-workspace-6.1.5-backport-fix_wayland_session_restore_saving.patch diff --git a/plasma-workspace-6.1.5-backport-fix_wayland_session_restore_saving.patch b/plasma-workspace-6.1.5-backport-fix_wayland_session_restore_saving.patch new file mode 100644 index 0000000..a267cb0 --- /dev/null +++ b/plasma-workspace-6.1.5-backport-fix_wayland_session_restore_saving.patch @@ -0,0 +1,39 @@ +From fae71841ff018e34bbb02aa1098b53f63c1743d2 Mon Sep 17 00:00:00 2001 +From: Fushan Wen +Date: Tue, 17 Sep 2024 07:53:35 +0000 +Subject: [PATCH] startkde: Fix wayland session restore saving + +When we added manual saving support to plasma-shutdown a guard was +changed in the normal shutdown path. This guard was wrong, we want to +check we're in the restorePreviousLogout path here. + +This amends 804976c5ecec1fbf5f6e7e09970a8269bdf748d2 + +BUG: 436318 + + +(cherry picked from commit 4dff1973116597210cf9fb1c102e5c9433d13b1d) + +89ee67ad startkde: Fix wayland session restore saving + +Co-authored-by: David Edmundson +--- + startkde/plasma-shutdown/shutdown.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/startkde/plasma-shutdown/shutdown.cpp b/startkde/plasma-shutdown/shutdown.cpp +index 11c002bcd80..ab93cca6ef7 100644 +--- a/startkde/plasma-shutdown/shutdown.cpp ++++ b/startkde/plasma-shutdown/shutdown.cpp +@@ -84,7 +84,7 @@ void Shutdown::ksmServerComplete() + { + const KConfigGroup c(KSharedConfig::openConfig(QStringLiteral("ksmserverrc")), QStringLiteral("General")); + +- if (c.readEntry("loginMode", "restorePreviousLogout") == QLatin1String("restoreSavedSession")) { ++ if (c.readEntry("loginMode", "restorePreviousLogout") == QLatin1String("restorePreviousLogout")) { + // Now record windows that are not session managed + int ret = QProcess::execute(QStringLiteral(PLASMA_FALLBACK_SESSION_SAVE_BIN)); + if (ret) { +-- +GitLab + diff --git a/plasma-workspace.spec b/plasma-workspace.spec index 91fffa2..ea7db14 100644 --- a/plasma-workspace.spec +++ b/plasma-workspace.spec @@ -2,7 +2,7 @@ Name: plasma-workspace Version: 6.1.5 -Release: 1mamba +Release: 2mamba Summary: KDE Plasma Workspace Group: Graphical Desktop/Applications/Environment Vendor: openmamba @@ -20,6 +20,7 @@ Source7: openmambaLookAndFeel.sh Source8: openmamba-preview-light.png Source9: openmamba-preview-dark.png Patch1: plasma-workspace-5.25.4-hide-qtwindows-style.patch +Patch2: plasma-workspace-6.1.5-backport-fix_wayland_session_restore_saving.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -196,6 +197,7 @@ openmamba theme for KDE Plasma. #-D -T #:<< __EOF %patch 1 -p1 +%patch 2 -p1 -b .backport-fix_wayland_session_restore_saving # From Fedora @@ -466,6 +468,9 @@ install -D -m0755 %{SOURCE7} %{buildroot}%{_datadir}/kconf_update/openmambaLookA %{_datadir}/kconf_update/openmambaLookAndFeel.* %changelog +* Wed Sep 18 2024 Silvan Calarco 6.1.5-2mamba +- backport upstream patch to fix session restore on wayland (https://bugs.kde.org/show_bug.cgi?id=436318 ) + * Sat Sep 14 2024 Automatic Build System 6.1.5-1mamba - automatic version update by autodist