diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2022-01-20 12:21:36 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-01-20 14:24:17 +0100 |
commit | 463d9497faf4e409a8ec0f16201b05145da26538 (patch) | |
tree | 42deb8eb7f4e04bb6348522e343820eff76d7bf7 /kde-frameworks | |
parent | kde-frameworks/plasma: Fix Kickoff context menu missing option(s) (diff) | |
download | gentoo-463d9497faf4e409a8ec0f16201b05145da26538.tar.gz gentoo-463d9497faf4e409a8ec0f16201b05145da26538.tar.bz2 gentoo-463d9497faf4e409a8ec0f16201b05145da26538.zip |
kde-frameworks/plasma: Fix crash when screen gets disabled/enabled
Upstream commit ecf0cc36936f69830a07937b97807ec0ba4d3f41
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=447752
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r-- | kde-frameworks/plasma/files/plasma-5.90.0-KDEBUG-447752.patch | 68 | ||||
-rw-r--r-- | kde-frameworks/plasma/plasma-5.90.0-r1.ebuild | 5 |
2 files changed, 72 insertions, 1 deletions
diff --git a/kde-frameworks/plasma/files/plasma-5.90.0-KDEBUG-447752.patch b/kde-frameworks/plasma/files/plasma-5.90.0-KDEBUG-447752.patch new file mode 100644 index 000000000000..62cb8a52b6c5 --- /dev/null +++ b/kde-frameworks/plasma/files/plasma-5.90.0-KDEBUG-447752.patch @@ -0,0 +1,68 @@ +From ecf0cc36936f69830a07937b97807ec0ba4d3f41 Mon Sep 17 00:00:00 2001 +From: Marco Martin <notmart@gmail.com> +Date: Mon, 10 Jan 2022 09:22:09 +0000 +Subject: [PATCH] Don't crash when a screen gets disabled and enabled again + +when a screen gets disabled, the containment loses its view, and when gets enabled again, +the process of the old orphaned containment getting a new view causes a plasma crash. +It comes from the wallpaper, which indicates a hierarchy of C++ owned objects +makes the internal one (wallpaper) to not reset correctly its window and have a stray pointer to it. + +BUG:447752 +--- + .../qml/plasmoid/containmentinterface.cpp | 21 +++++++++++++++---- + .../qml/plasmoid/containmentinterface.h | 1 + + 2 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp +index d8a89014c..29a7738ca 100644 +--- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp ++++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp +@@ -74,10 +74,6 @@ void ContainmentInterface::init() + connect(m_activityInfo, &KActivities::Info::nameChanged, this, &ContainmentInterface::activityNameChanged); + Q_EMIT activityNameChanged(); + +- if (!m_containment->wallpaper().isEmpty()) { +- loadWallpaper(); +- } +- + AppletInterface::init(); + + // Create the ToolBox +@@ -1162,4 +1158,21 @@ bool ContainmentInterface::isLoading() const + return loading; + } + ++void ContainmentInterface::itemChange(ItemChange change, const ItemChangeData &value) ++{ ++ if (change == QQuickItem::ItemSceneChange) { ++ // we have a window: create the representations if needed ++ if (value.window && !m_containment->wallpaper().isEmpty()) { ++ loadWallpaper(); ++ } else if (m_wallpaperInterface) { ++ m_wallpaperInterface->deleteLater(); ++ m_wallpaperInterface = nullptr; ++ Q_EMIT wallpaperInterfaceChanged(); ++ } ++ } ++ ++ AppletInterface::itemChange(change, value); ++} ++ ++ + #include "moc_containmentinterface.cpp" +diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.h b/src/scriptengines/qml/plasmoid/containmentinterface.h +index a91c60c5e..f1276ee80 100644 +--- a/src/scriptengines/qml/plasmoid/containmentinterface.h ++++ b/src/scriptengines/qml/plasmoid/containmentinterface.h +@@ -169,6 +169,7 @@ protected: + void addContainmentActions(QMenu *desktopMenu, QEvent *event); + + virtual bool isLoading() const override; ++ void itemChange(ItemChange change, const ItemChangeData &value) override; + + Q_SIGNALS: + /** +-- +GitLab + diff --git a/kde-frameworks/plasma/plasma-5.90.0-r1.ebuild b/kde-frameworks/plasma/plasma-5.90.0-r1.ebuild index 801c23c0c8ee..fa06b05e874f 100644 --- a/kde-frameworks/plasma/plasma-5.90.0-r1.ebuild +++ b/kde-frameworks/plasma/plasma-5.90.0-r1.ebuild @@ -59,7 +59,10 @@ DEPEND="${RDEPEND} " BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )" -PATCHES=( "${FILESDIR}/${P}-KDEBUG-448590.patch" ) +PATCHES=( + "${FILESDIR}/${P}-KDEBUG-447752.patch" + "${FILESDIR}/${P}-KDEBUG-448590.patch" +) src_configure() { local mycmakeargs=( |