From c40550e20de760455b72632f815ae52506ff852b19231328c17b23b0e20b8f41 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 12 Jul 2017 17:45:08 +0000 Subject: [PATCH] Accepting request 509833 from home:wolfi323:test - Add Notifications-Check-for-corona-to-avoid-crash.patch to prevent a Plasma crash when removing a panel that has a system tray with the Notifications applet (boo#1046500, kde#378508) OBS-URL: https://build.opensuse.org/request/show/509833 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=335 --- ...ions-Check-for-corona-to-avoid-crash.patch | 33 +++++++++++++++++++ plasma5-workspace.changes | 7 ++++ plasma5-workspace.spec | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 Notifications-Check-for-corona-to-avoid-crash.patch diff --git a/Notifications-Check-for-corona-to-avoid-crash.patch b/Notifications-Check-for-corona-to-avoid-crash.patch new file mode 100644 index 0000000..eee0b96 --- /dev/null +++ b/Notifications-Check-for-corona-to-avoid-crash.patch @@ -0,0 +1,33 @@ +From 8a05294e5b3ef1df86f099edde837b8c8d28ccaf Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Wed, 12 Jul 2017 18:06:28 +0200 +Subject: [Notifications] Check for corona to avoid crash + +My previous attempt only fixed the case when notifications were directly in a panel. +Now it also no longer crashes when removing a panel that has a System Tray with the +notifications applet in it. + +BUG: 378508 +FIXED-IN: 5.8.8 + +Differential Revision: https://phabricator.kde.org/D6653 +--- + applets/notifications/lib/notificationsapplet.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/applets/notifications/lib/notificationsapplet.cpp b/applets/notifications/lib/notificationsapplet.cpp +index 4474c8c..f49071c 100644 +--- a/applets/notifications/lib/notificationsapplet.cpp ++++ b/applets/notifications/lib/notificationsapplet.cpp +@@ -63,7 +63,7 @@ void NotificationsApplet::onScreenChanges() + { + // when removing the panel the applet is in, the containment is being destroyed but its corona is still + // there, rightfully emitting availableScreenRectChanged and then we blow up if we try to access it. +- if (!containment()) { ++ if (!containment() || !containment()->corona()) { + return; + } + +-- +cgit v0.11.2 + diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index fd98282..b232865 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jul 12 16:36:16 UTC 2017 - wbauer@tmo.at + +- Add Notifications-Check-for-corona-to-avoid-crash.patch to + prevent a Plasma crash when removing a panel that has a system + tray with the Notifications applet (boo#1046500, kde#378508) + ------------------------------------------------------------------- Sun Jul 9 09:51:05 UTC 2017 - wbauer@tmo.at diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index f7f3737..0971b17 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -37,6 +37,7 @@ Patch0: 0001-Rename-qdbus-in-startkde.patch # PATCH-FIX-OPENSUSE 0001-Ignore-default-sddm-face-icons.patch boo#1001364 fabian@ritter-vogt.de -- Ignore default sddm face icons Patch1: 0001-Ignore-default-sddm-face-icons.patch # PATCHES 100-200 and above are from upstream 5.10 branch +Patch100: Notifications-Check-for-corona-to-avoid-crash.patch # PATCHES 201-300 and above are from upstream master/5.11 branch Patch201: applauncher-allow-to-show-apps-by-name.patch Patch202: logoutdialog-honor-Offer-shutdown-options.patch @@ -211,6 +212,7 @@ workspace. Development files. %setup -q -n plasma-workspace-%{version} %patch0 -p1 %patch1 -p1 +%patch100 -p1 %patch201 -p1 %patch202 -p1