From 1503b28e7a30c164cab750c27268f704b8a5cec6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 26 Jul 2022 14:59:08 +0100 Subject: gentoo auto-resync : 26:07:2022 - 14:59:07 --- ...asma-5.96.0-fix-crash-in-WindowShadowTile.patch | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 kde-frameworks/plasma/files/plasma-5.96.0-fix-crash-in-WindowShadowTile.patch (limited to 'kde-frameworks/plasma/files') diff --git a/kde-frameworks/plasma/files/plasma-5.96.0-fix-crash-in-WindowShadowTile.patch b/kde-frameworks/plasma/files/plasma-5.96.0-fix-crash-in-WindowShadowTile.patch new file mode 100644 index 000000000000..8d37a508b359 --- /dev/null +++ b/kde-frameworks/plasma/files/plasma-5.96.0-fix-crash-in-WindowShadowTile.patch @@ -0,0 +1,55 @@ +From 50eaece7aef004b588a684c9fadff0f6787f2ef8 Mon Sep 17 00:00:00 2001 +From: David Edmundson +Date: Thu, 14 Jul 2022 22:45:14 +0100 +Subject: [PATCH] Scope DialogShadows lifetime to application + +- DialogShadows own KWayland::Client::buffer objects + - Buffer cleanup makes wayland calls + - wayland calls after QGuiApplication has stoped will fail + +Q_GLOBAL_STATIC mangaged objects can outlive the QGuiApplication. + +BUG:443706 +--- + src/plasmaquick/dialogshadows.cpp | 18 ++++++------------ + 1 file changed, 6 insertions(+), 12 deletions(-) + +diff --git a/src/plasmaquick/dialogshadows.cpp b/src/plasmaquick/dialogshadows.cpp +index 17c9a41e2..93b9bcc0f 100644 +--- a/src/plasmaquick/dialogshadows.cpp ++++ b/src/plasmaquick/dialogshadows.cpp +@@ -37,17 +37,6 @@ public: + QVector m_tiles; + }; + +-class DialogShadowsSingleton +-{ +-public: +- DialogShadowsSingleton() +- { +- } +- +- DialogShadows self; +-}; +- +-Q_GLOBAL_STATIC(DialogShadowsSingleton, privateDialogShadowsSelf) + + DialogShadows::DialogShadows(QObject *parent, const QString &prefix) + : Plasma::Svg(parent) +@@ -64,7 +53,12 @@ DialogShadows::~DialogShadows() + + DialogShadows *DialogShadows::self() + { +- return &privateDialogShadowsSelf->self; ++ // KF6 port to Q_APPLICATION_STATIC ++ static DialogShadows *s_privateDialogShadowsSelf = nullptr; ++ if (!s_privateDialogShadowsSelf) { ++ s_privateDialogShadowsSelf = new DialogShadows(qApp); ++ } ++ return s_privateDialogShadowsSelf; + } + + void DialogShadows::addWindow(QWindow *window, Plasma::FrameSvg::EnabledBorders enabledBorders) +-- +GitLab + -- cgit v1.2.3