feat: add upstream patch

epel9^2
Marc Deop i Argemí 2 years ago
parent 3c9c25ad0d
commit 7de448f2a9
No known key found for this signature in database
GPG Key ID: 0BD48519688058E8

@ -0,0 +1,37 @@
From fc01a7f837d06ee9e92d02f13acb79c2b06e9e3c Mon Sep 17 00:00:00 2001
From: Fushan Wen <qydwhotmail@gmail.com>
Date: Fri, 4 Aug 2023 12:40:17 +0800
Subject: [PATCH] shell: avoid potential crash when previous window is gone
before returning focus
m_previousPlasmaWindow is bound to a window, and if a window is closed
before `restorePreviousWindow` is called, there will be a crash. Use
QPointer to track the window destruction.
---
shell/shellcorona.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/shell/shellcorona.h b/shell/shellcorona.h
index a3aff351af..db218d16e2 100644
--- a/shell/shellcorona.h
+++ b/shell/shellcorona.h
@@ -14,6 +14,7 @@
#include <QDBusContext>
#include <QDBusVariant>
+#include <QPointer>
#include <QSet>
#include <QTimer>
@@ -301,7 +302,7 @@ private:
KWayland::Client::PlasmaShell *m_waylandPlasmaShell;
// For getting the active window on Wayland
KWayland::Client::PlasmaWindowManagement *m_waylandWindowManagement = nullptr;
- KWayland::Client::PlasmaWindow *m_previousPlasmaWindow = nullptr;
+ QPointer<KWayland::Client::PlasmaWindow> m_previousPlasmaWindow;
bool m_closingDown : 1;
bool m_screenReorderInProgress = false;
QString m_testModeLayout;
--
GitLab

@ -28,7 +28,7 @@
Name: plasma-workspace Name: plasma-workspace
Summary: Plasma workspace, applications and applets Summary: Plasma workspace, applications and applets
Version: 5.27.7 Version: 5.27.7
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
URL: https://invent.kde.org/plasma/%{name} URL: https://invent.kde.org/plasma/%{name}
@ -63,6 +63,8 @@ Source40: ssh-agent.conf
Source41: spice-vdagent.conf Source41: spice-vdagent.conf
## upstream Patches (master branch) ## upstream Patches (master branch)
# https://invent.kde.org/plasma/plasma-workspace/-/commit/fc01a7f837d06ee9e92d02f13acb79c2b06e9e3c
Patch0: fc01a7f837d06ee9e92d02f13acb79c2b06e9e3c.patch
## upstreamable Patches ## upstreamable Patches
@ -809,6 +811,9 @@ fi
%changelog %changelog
* Sat Aug 12 2023 Marc Deop i Argemí <marcdeop@fedoraproject.org> - 5.27.7-2
- Add upstream patch
* Tue Aug 01 2023 Marc Deop i Argemí <marcdeop@fedoraproject.org> - 5.27.7-1 * Tue Aug 01 2023 Marc Deop i Argemí <marcdeop@fedoraproject.org> - 5.27.7-1
- 5.27.7 - 5.27.7

Loading…
Cancel
Save