summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-07-26 13:36:12 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-07-26 14:04:52 +0200
commit818c9a3e72aa16feacd6535c555ba7ec7496e1d5 (patch)
treecc163c59057c77bb21f4022e21cb93ab30752f57 /kde-frameworks/plasma
parentkde-frameworks/kio: Fix RAW file image preview (diff)
downloadgentoo-818c9a3e72aa16feacd6535c555ba7ec7496e1d5.tar.gz
gentoo-818c9a3e72aa16feacd6535c555ba7ec7496e1d5.tar.bz2
gentoo-818c9a3e72aa16feacd6535c555ba7ec7496e1d5.zip
kde-frameworks/plasma: Fix (wayland session) crash in WindowShadowTile
Upstream commit 50eaece7aef004b588a684c9fadff0f6787f2ef8 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=443706 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/plasma')
-rw-r--r--kde-frameworks/plasma/files/plasma-5.96.0-fix-crash-in-WindowShadowTile.patch55
-rw-r--r--kde-frameworks/plasma/plasma-5.96.0-r1.ebuild75
2 files changed, 130 insertions, 0 deletions
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 <kde@davidedmundson.co.uk>
+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<KWindowShadowTile::Ptr> 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
+
diff --git a/kde-frameworks/plasma/plasma-5.96.0-r1.ebuild b/kde-frameworks/plasma/plasma-5.96.0-r1.ebuild
new file mode 100644
index 000000000000..401899a558a0
--- /dev/null
+++ b/kde-frameworks/plasma/plasma-5.96.0-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KDE_ORG_NAME="${PN}-framework"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.4
+VIRTUALX_REQUIRED="test"
+inherit ecm frameworks.kde.org
+
+DESCRIPTION="Plasma framework"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="gles2-only man wayland X"
+
+RESTRICT="test"
+
+RDEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5[gles2-only=,X=]
+ >=dev-qt/qtquickcontrols-${QTMIN}:5
+ >=dev-qt/qtsql-${QTMIN}:5
+ >=dev-qt/qtsvg-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ =kde-frameworks/kactivities-${PVCUT}*:5
+ =kde-frameworks/karchive-${PVCUT}*:5
+ =kde-frameworks/kconfig-${PVCUT}*:5[qml]
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5
+ =kde-frameworks/kdeclarative-${PVCUT}*:5
+ =kde-frameworks/kglobalaccel-${PVCUT}*:5
+ =kde-frameworks/kguiaddons-${PVCUT}*:5
+ =kde-frameworks/ki18n-${PVCUT}*:5
+ =kde-frameworks/kiconthemes-${PVCUT}*:5
+ =kde-frameworks/kio-${PVCUT}*:5
+ =kde-frameworks/kirigami-${PVCUT}*:5
+ =kde-frameworks/knotifications-${PVCUT}*:5
+ =kde-frameworks/kpackage-${PVCUT}*:5
+ =kde-frameworks/kservice-${PVCUT}*:5
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+ =kde-frameworks/kwindowsystem-${PVCUT}*:5
+ =kde-frameworks/kxmlgui-${PVCUT}*:5
+ !gles2-only? ( media-libs/libglvnd[X?] )
+ wayland? (
+ =kde-frameworks/kwayland-${PVCUT}*:5
+ media-libs/libglvnd
+ )
+ X? (
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ x11-libs/libX11
+ x11-libs/libxcb
+ )
+"
+DEPEND="${RDEPEND}
+ X? ( x11-base/xorg-proto )
+"
+BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )"
+
+PATCHES=( "${FILESDIR}/${P}-fix-crash-in-WindowShadowTile.patch" ) # KDE-bug 443706
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package !gles2-only OpenGL)
+ $(cmake_use_find_package man KF5DocTools)
+ $(cmake_use_find_package wayland EGL)
+ $(cmake_use_find_package wayland KF5Wayland)
+ $(cmake_use_find_package X X11)
+ $(cmake_use_find_package X XCB)
+ )
+
+ ecm_src_configure
+}