From 9fc2ffa91e9fa3cee99028e9ae685e317a155d930daf28de1add2f3514e2f1e3 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sat, 2 May 2015 10:27:04 +0000 Subject: [PATCH 1/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=69 --- ...rminate-animation-for-suspended-jobs.patch | 64 +++++++++ ...place-apos-with-as-apos-is-not-suppo.patch | 34 +++++ ...tch-dialog-borders-with-addwidgets-s.patch | 28 ++++ ...-Manually-keep-track-of-jobs-sources.patch | 135 ++++++++++++++++++ 0006-Fix-running-applet-calculation.patch | 26 ++++ ...art-Timer-when-the-dialog-is-visible.patch | 40 ++++++ 0009-check-for-model-existence.patch | 30 ++++ ...owermanagementEngine-populateApplica.patch | 30 ++++ ...ways-check-first-if-the-dispatch-tim.patch | 81 +++++++++++ ...ear-notification-from-show-queue-if-.patch | 47 ++++++ plasma5-workspace.changes | 18 +++ plasma5-workspace.spec | 20 +++ 12 files changed, 553 insertions(+) create mode 100644 0001-Disable-indeterminate-animation-for-suspended-jobs.patch create mode 100644 0003-notifications-Replace-apos-with-as-apos-is-not-suppo.patch create mode 100644 0004-Match-window-switch-dialog-borders-with-addwidgets-s.patch create mode 100644 0005-Manually-keep-track-of-jobs-sources.patch create mode 100644 0006-Fix-running-applet-calculation.patch create mode 100644 0008-Only-restart-Timer-when-the-dialog-is-visible.patch create mode 100644 0009-check-for-model-existence.patch create mode 100644 0010-Fix-a-crash-in-PowermanagementEngine-populateApplica.patch create mode 100644 0011-notifications-Always-check-first-if-the-dispatch-tim.patch create mode 100644 0012-notifications-Clear-notification-from-show-queue-if-.patch diff --git a/0001-Disable-indeterminate-animation-for-suspended-jobs.patch b/0001-Disable-indeterminate-animation-for-suspended-jobs.patch new file mode 100644 index 0000000..e265bb5 --- /dev/null +++ b/0001-Disable-indeterminate-animation-for-suspended-jobs.patch @@ -0,0 +1,64 @@ +From a3b79c165ae69abb9b390a5c657fc1db483a1e0d Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Sun, 26 Apr 2015 19:06:21 +0200 +Subject: [PATCH 01/12] Disable indeterminate animation for suspended jobs + +Since they're not doing anything there's no need for an animation. Also simplify +jobstate handling, we're only ever interested in the suspended state. +--- + applets/notifications/package/contents/ui/JobDelegate.qml | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/applets/notifications/package/contents/ui/JobDelegate.qml b/applets/notifications/package/contents/ui/JobDelegate.qml +index f3f091d7a98b940c6bbc76aa881efee8371fa05e..67418893a98997a3c90f17ba5de843f8eff48d69 100644 +--- a/applets/notifications/package/contents/ui/JobDelegate.qml ++++ b/applets/notifications/package/contents/ui/JobDelegate.qml +@@ -34,11 +34,12 @@ Column { + readonly property int layoutSpacing: units.largeSpacing / 4 + readonly property int animationDuration: units.shortDuration * 2 + ++ readonly property string infoMessage: getData(jobsSource.data, "infoMessage", '') + readonly property string labelName0: getData(jobsSource.data, "labelName0", '') + readonly property string labelName1: getData(jobsSource.data, "labelName1", '') + readonly property string label0: getData(jobsSource.data, "label0", '') + readonly property string label1: getData(jobsSource.data, "label1", '') +- readonly property string jobstate: getData(jobsSource.data, "state", '') ++ readonly property bool isSuspended: getData(jobsSource.data, "state", '') === "suspended" + + function getData(data, name, defaultValue) { + return data[modelData] ? (data[modelData][name] ? data[modelData][name] : defaultValue) : defaultValue; +@@ -49,7 +50,7 @@ Column { + width: parent.width + opacity: 0.6 + level: 3 +- text: getData(jobsSource.data, "infoMessage", '') ++ text: infoMessage + } + + RowLayout { +@@ -149,17 +150,19 @@ Column { + maximumValue: 100 + //percentage doesn't always exist, so doesn't get in the model + value: getData(jobsSource.data, "percentage", 0) +- indeterminate: plasmoid.expanded && jobsSource.data[modelData] && typeof jobsSource.data[modelData]["percentage"] === "undefined" ++ indeterminate: plasmoid.expanded && jobsSource.data[modelData] ++ && typeof jobsSource.data[modelData]["percentage"] === "undefined" ++ && !jobItem.isSuspended + } + + PlasmaComponents.ToolButton { + id: pauseButton +- iconSource: jobItem.jobstate == "suspended" ? "media-playback-start" : "media-playback-pause" ++ iconSource: jobItem.isSuspended ? "media-playback-start" : "media-playback-pause" + visible: getData(jobsSource.data, "suspendable", 0) + + onClicked: { + var operationName = "suspend" +- if (jobItem.jobstate == "suspended") { ++ if (jobItem.isSuspended) { + operationName = "resume" + } + var service = jobsSource.serviceForSource(modelData) +-- +2.3.5 + diff --git a/0003-notifications-Replace-apos-with-as-apos-is-not-suppo.patch b/0003-notifications-Replace-apos-with-as-apos-is-not-suppo.patch new file mode 100644 index 0000000..a3cbaeb --- /dev/null +++ b/0003-notifications-Replace-apos-with-as-apos-is-not-suppo.patch @@ -0,0 +1,34 @@ +From d95c4b850b03776c95efd04baad8c92864c42a3d Mon Sep 17 00:00:00 2001 +From: Martin Klapetek +Date: Mon, 27 Apr 2015 14:33:42 +0200 +Subject: [PATCH 03/12] [notifications] Replace ' with ' as ' is not + supported by StyledText + +QtQuick's Text with StyledFormat supports only html3.2 subset of stuff. +' is html4 and as such gets removed altogther, which is obviously +unwanted. + +Reviewed-by: Kai Uwe Broulik +BUG: 346710 +FIXED-IN: 5.3.1 +--- + dataengines/notifications/notificationsengine.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/dataengines/notifications/notificationsengine.cpp b/dataengines/notifications/notificationsengine.cpp +index 6a417294c65c71960f1c1ba022e8c2976a0b9464..37a11dd1f70bc7692112be1d51918a39682969d9 100644 +--- a/dataengines/notifications/notificationsengine.cpp ++++ b/dataengines/notifications/notificationsengine.cpp +@@ -232,6 +232,9 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id, + // text where it finds a stray ampersand. + // Only &{apos, quot, gt, lt, amp}; as well as { character references will be allowed + bodyFinal.replace(QRegularExpression("&(?!(?:apos|quot|[gl]t|amp);|#)"), QLatin1String("&")); ++ // The Text.StyledText format handles only html3.2 stuff and ' is html4 stuff ++ // so we need to replace it here otherwise it will not render at all. ++ bodyFinal.replace(QLatin1String("'"), QChar('\'')); + + Plasma::DataEngine::Data notificationData; + notificationData.insert("id", QString::number(id)); +-- +2.3.5 + diff --git a/0004-Match-window-switch-dialog-borders-with-addwidgets-s.patch b/0004-Match-window-switch-dialog-borders-with-addwidgets-s.patch new file mode 100644 index 0000000..e4afe84 --- /dev/null +++ b/0004-Match-window-switch-dialog-borders-with-addwidgets-s.patch @@ -0,0 +1,28 @@ +From f0d0518a70417b35124c0089325b32a6e6bf8f5e Mon Sep 17 00:00:00 2001 +From: David Edmundson +Date: Sun, 26 Apr 2015 13:37:29 +0200 +Subject: [PATCH 04/12] Match window switch dialog borders with + addwidgets/switch activity + +BUG: 345614 +REVIEW: 123506 +--- + lookandfeel/contents/windowswitcher/WindowSwitcher.qml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lookandfeel/contents/windowswitcher/WindowSwitcher.qml b/lookandfeel/contents/windowswitcher/WindowSwitcher.qml +index e4a46366c2a4e157860f55d2cb0e3781a239cb66..63799e12ae439e0a3ffd1d51b304fea0bf918f4b 100644 +--- a/lookandfeel/contents/windowswitcher/WindowSwitcher.qml ++++ b/lookandfeel/contents/windowswitcher/WindowSwitcher.qml +@@ -41,7 +41,7 @@ KWin.Switcher { + + PlasmaCore.Dialog { + id: dialog +- location: PlasmaCore.Types.Floating ++ location: PlasmaCore.Types.LeftEdge + visible: tabBox.visible + flags: Qt.X11BypassWindowManagerHint + x: screenGeometry.x +-- +2.3.5 + diff --git a/0005-Manually-keep-track-of-jobs-sources.patch b/0005-Manually-keep-track-of-jobs-sources.patch new file mode 100644 index 0000000..2669649 --- /dev/null +++ b/0005-Manually-keep-track-of-jobs-sources.patch @@ -0,0 +1,135 @@ +From bc5c47537f3bbb706b3fe7af66508f5ef2fadc6e Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Mon, 27 Apr 2015 20:09:14 +0200 +Subject: [PATCH 05/12] Manually keep track of jobs sources + +DataSources source is a QStringList property which means changes within cannot be tracked +causing all the job delegates to be destroyed and re-created when sourcesChanged is emitted. +This is pretty wasteful and also causes the delegates to lose their state (eg. details expanded) + +REVIEW: 123502 +BUG: 346673 +FIXED-IN: 5.3.1 +--- + .../package/contents/ui/JobDelegate.qml | 11 +++++---- + applets/notifications/package/contents/ui/Jobs.qml | 27 ++++++++++++++-------- + 2 files changed, 24 insertions(+), 14 deletions(-) + +diff --git a/applets/notifications/package/contents/ui/JobDelegate.qml b/applets/notifications/package/contents/ui/JobDelegate.qml +index 67418893a98997a3c90f17ba5de843f8eff48d69..4717d49a8b3c1719d84fe7577b9b0b2d72f75873 100644 +--- a/applets/notifications/package/contents/ui/JobDelegate.qml ++++ b/applets/notifications/package/contents/ui/JobDelegate.qml +@@ -42,7 +42,8 @@ Column { + readonly property bool isSuspended: getData(jobsSource.data, "state", '') === "suspended" + + function getData(data, name, defaultValue) { +- return data[modelData] ? (data[modelData][name] ? data[modelData][name] : defaultValue) : defaultValue; ++ var source = model.name ++ return data[source] ? (data[source][name] ? data[source][name] : defaultValue) : defaultValue; + } + + PlasmaExtras.Heading { +@@ -150,8 +151,8 @@ Column { + maximumValue: 100 + //percentage doesn't always exist, so doesn't get in the model + value: getData(jobsSource.data, "percentage", 0) +- indeterminate: plasmoid.expanded && jobsSource.data[modelData] +- && typeof jobsSource.data[modelData]["percentage"] === "undefined" ++ indeterminate: plasmoid.expanded && jobsSource.data[model.name] ++ && typeof jobsSource.data[model.name]["percentage"] === "undefined" + && !jobItem.isSuspended + } + +@@ -165,7 +166,7 @@ Column { + if (jobItem.isSuspended) { + operationName = "resume" + } +- var service = jobsSource.serviceForSource(modelData) ++ var service = jobsSource.serviceForSource(model.name) + var operation = service.operationDescription(operationName) + service.startOperationCall(operation) + } +@@ -177,7 +178,7 @@ Column { + visible: getData(jobsSource.data, "killable", 0) + + onClicked: { +- var service = jobsSource.serviceForSource(modelData) ++ var service = jobsSource.serviceForSource(model.name) + var operation = service.operationDescription("stop") + service.startOperationCall(operation) + } +diff --git a/applets/notifications/package/contents/ui/Jobs.qml b/applets/notifications/package/contents/ui/Jobs.qml +index 6ecf3669147d5dcc4ff9d4a94db7cc47408c3495..3307d38b9a1ea54b075b61f023b083eae08428ac 100644 +--- a/applets/notifications/package/contents/ui/Jobs.qml ++++ b/applets/notifications/package/contents/ui/Jobs.qml +@@ -28,21 +28,34 @@ Column { + id: jobsRoot + width: parent.width + +- property alias count: jobsRepeater.count ++ property alias count: jobs.count ++ ++ ListModel { ++ id: jobs ++ } + + PlasmaCore.DataSource { + id: jobsSource + +- property variant runningJobs: ({}) ++ property var runningJobs: ({}) + + engine: "applicationjobs" + interval: 0 + + onSourceAdded: { + connectSource(source) ++ jobs.append({name: source}) + } + + onSourceRemoved: { ++ // remove source from jobs model ++ for (var i = 0, len = jobs.count; i < len; ++i) { ++ if (jobs.get(i).name === source) { ++ jobs.remove(i) ++ break ++ } ++ } ++ + if (!notifications) { + return + } +@@ -84,9 +97,7 @@ Column { + } + + onNewData: { +- var jobs = runningJobs +- jobs[sourceName] = data +- runningJobs = jobs ++ runningJobs[sourceName] = data + } + + onDataChanged: { +@@ -107,7 +118,7 @@ Column { + } + + Item { +- visible: jobsRepeater.count > 3 ++ visible: jobs.count > 3 + + PlasmaComponents.ProgressBar { + anchors { +@@ -123,9 +134,7 @@ Column { + } + + Repeater { +- id: jobsRepeater +- +- model: jobsSource.sources ++ model: jobs + delegate: JobDelegate {} + } + } +-- +2.3.5 + diff --git a/0006-Fix-running-applet-calculation.patch b/0006-Fix-running-applet-calculation.patch new file mode 100644 index 0000000..77a1172 --- /dev/null +++ b/0006-Fix-running-applet-calculation.patch @@ -0,0 +1,26 @@ +From 2b7d3c4bc5b126111fec6b3ff3046b16541329a6 Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Mon, 27 Apr 2015 23:23:48 +0200 +Subject: [PATCH 06/12] Fix running applet calculation + +We get an int rather than a bool :) +--- + components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp +index 376dd4c0d35082197c409aa5f041e871ad79ac79..99e9add0fd06b415e23c96ce8773ca8b639cd195 100644 +--- a/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp ++++ b/components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp +@@ -277,7 +277,7 @@ void PlasmaAppletItemModel::setRunningApplets(const QHash &apps) + PlasmaAppletItem *p = dynamic_cast(i); + + if (p) { +- const bool running = apps.value(p->pluginName()); ++ const int running = apps.value(p->pluginName()); + p->setRunning(running); + } + } +-- +2.3.5 + diff --git a/0008-Only-restart-Timer-when-the-dialog-is-visible.patch b/0008-Only-restart-Timer-when-the-dialog-is-visible.patch new file mode 100644 index 0000000..6696120 --- /dev/null +++ b/0008-Only-restart-Timer-when-the-dialog-is-visible.patch @@ -0,0 +1,40 @@ +From 710837e3f82e1dc9e3a12f1dcb285c831ae5f74b Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Tue, 28 Apr 2015 20:46:14 +0200 +Subject: [PATCH 08/12] Only restart Timer when the dialog is visible + +Otherwise the Timer might fire when there are no notification properties +causing warnings. + +Reviewed-by: mklapetek +--- + applets/notifications/package/contents/ui/NotificationPopup.qml | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/applets/notifications/package/contents/ui/NotificationPopup.qml b/applets/notifications/package/contents/ui/NotificationPopup.qml +index 01ac2a1458c5298bf03b2f322352ce3fb710b5ce..415a125e532ba3da6414ad40ebecfb290c075b3a 100644 +--- a/applets/notifications/package/contents/ui/NotificationPopup.qml ++++ b/applets/notifications/package/contents/ui/NotificationPopup.qml +@@ -42,7 +42,9 @@ PlasmaCore.Dialog { + } + + onYChanged: { +- notificationTimer.restart(); ++ if (visible) { ++ notificationTimer.restart(); ++ } + } + + function populatePopup(notification) { +@@ -108,7 +110,7 @@ PlasmaCore.Dialog { + } + + textItem: PlasmaComponents.Label { +- wrapMode: Text.WordWrap ++ wrapMode: Text.WrapAtWordBoundaryOrAnywhere + elide: Text.ElideRight + verticalAlignment: Text.AlignTop + onLinkActivated: Qt.openUrlExternally(link) +-- +2.3.5 + diff --git a/0009-check-for-model-existence.patch b/0009-check-for-model-existence.patch new file mode 100644 index 0000000..710f6ae --- /dev/null +++ b/0009-check-for-model-existence.patch @@ -0,0 +1,30 @@ +From a234c0923767649cc6545866a563ffc4dba58de2 Mon Sep 17 00:00:00 2001 +From: Marco Martin +Date: Wed, 29 Apr 2015 09:28:11 +0200 +Subject: [PATCH 09/12] check for model existence + +BUG:346870 +--- + wallpapers/image/image.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/wallpapers/image/image.cpp b/wallpapers/image/image.cpp +index a3b9c1028947dbb69c6e22e1584137912525ae8f..f5920bf9bfa1d4746d634a48163064a056867433 100644 +--- a/wallpapers/image/image.cpp ++++ b/wallpapers/image/image.cpp +@@ -799,6 +799,12 @@ void Image::removeWallpaper(QString name) + + void Image::commitDeletion() + { ++ //This is invokable from qml, so at any moment ++ //we can't be sure the model exists ++ if (!m_model) { ++ return; ++ } ++ + for (const QString wallpaperCandidate : m_model->wallpapersAwaitingDeletion()) { + removeWallpaper(wallpaperCandidate); + } +-- +2.3.5 + diff --git a/0010-Fix-a-crash-in-PowermanagementEngine-populateApplica.patch b/0010-Fix-a-crash-in-PowermanagementEngine-populateApplica.patch new file mode 100644 index 0000000..e11cfd1 --- /dev/null +++ b/0010-Fix-a-crash-in-PowermanagementEngine-populateApplica.patch @@ -0,0 +1,30 @@ +From 08cbba07eb8927ce3a0f864eda8dfe1f8f1a6e44 Mon Sep 17 00:00:00 2001 +From: Emmanuel Pescosta +Date: Wed, 29 Apr 2015 12:28:50 +0200 +Subject: [PATCH 10/12] Fix a crash in + PowermanagementEngine::populateApplicationData when the given name is empty. + +Use QString::section instead of QString::split + QList::last (which requires +a non empty list) to prevent the crash. + +REVIEW: 123555 +--- + dataengines/powermanagement/powermanagementengine.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dataengines/powermanagement/powermanagementengine.cpp b/dataengines/powermanagement/powermanagementengine.cpp +index 2fbf23fb9cc1df8ae45d2cb68f7145642996c149..ca8d77d3537f12d45526c1aed55b44b6e29394bc 100644 +--- a/dataengines/powermanagement/powermanagementengine.cpp ++++ b/dataengines/powermanagement/powermanagementengine.cpp +@@ -647,7 +647,7 @@ void PowermanagementEngine::populateApplicationData(const QString &name, QString + m_applicationInfo.insert(name, qMakePair(*prettyName, *icon)); + } else { + *prettyName = name; +- *icon = name.split(QLatin1Char('/'), QString::SkipEmptyParts).last().toLower(); ++ *icon = name.section(QLatin1Char('/'), -1).toLower(); + } + } + } +-- +2.3.5 + diff --git a/0011-notifications-Always-check-first-if-the-dispatch-tim.patch b/0011-notifications-Always-check-first-if-the-dispatch-tim.patch new file mode 100644 index 0000000..f7e8066 --- /dev/null +++ b/0011-notifications-Always-check-first-if-the-dispatch-tim.patch @@ -0,0 +1,81 @@ +From 83ec35b632ee495df4b3c6f33f7ca33bca398a8f Mon Sep 17 00:00:00 2001 +From: Martin Klapetek +Date: Fri, 1 May 2015 14:51:37 +0200 +Subject: [PATCH 11/12] [notifications] Always check first if the dispatch + timer isn't running already + +That should prevent various mis-queueings. If the timer is running, the +queue will get processed once the timer times out. + +CCBUG: 342605 +--- + .../notifications/plugin/notificationshelper.cpp | 25 +++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) + +diff --git a/applets/notifications/plugin/notificationshelper.cpp b/applets/notifications/plugin/notificationshelper.cpp +index 37375d01b09ed399a4f0fe01c60821bc53f7f151..b56e3933bc5ee23bb53892126c5af91caee74cc6 100644 +--- a/applets/notifications/plugin/notificationshelper.cpp ++++ b/applets/notifications/plugin/notificationshelper.cpp +@@ -164,7 +164,9 @@ void NotificationsHelper::processShow() + repositionPopups(); + QTimer::singleShot(300, popup, SLOT(show())); + +- m_dispatchTimer->start(); ++ if (!m_dispatchTimer->isActive()) { ++ m_dispatchTimer->start(); ++ } + } + + void NotificationsHelper::processHide() +@@ -204,7 +206,9 @@ void NotificationsHelper::processHide() + repositionPopups(); + } + +- m_dispatchTimer->start(); ++ if (!m_dispatchTimer->isActive()) { ++ m_dispatchTimer->start(); ++ } + } + + void NotificationsHelper::displayNotification(const QVariantMap ¬ificationData) +@@ -243,7 +247,12 @@ void NotificationsHelper::displayNotification(const QVariantMap ¬ificationDat + m_showQueue.append(notificationData); + m_mutex->unlock(); + +- processQueues(); ++ if (!m_dispatchTimer->isActive()) { ++ // If the dispatch timer is not already running, process ++ // the queues directly, that should cut the time between ++ // notification emitting the event and popup displaying ++ processQueues(); ++ } + } + + void NotificationsHelper::closePopup(const QString &sourceName) +@@ -258,7 +267,10 @@ void NotificationsHelper::closePopup(const QString &sourceName) + m_mutex->lockForWrite(); + m_hideQueue.append(popup); + m_mutex->unlock(); +- processQueues(); ++ ++ if (!m_dispatchTimer->isActive()) { ++ processQueues(); ++ } + } + } + +@@ -274,7 +286,10 @@ void NotificationsHelper::onPopupClosed() + m_mutex->lockForWrite(); + m_hideQueue << popup; + m_mutex->unlock(); +- processQueues(); ++ ++ if (!m_dispatchTimer->isActive()) { ++ processQueues(); ++ } + } + } + +-- +2.3.5 + diff --git a/0012-notifications-Clear-notification-from-show-queue-if-.patch b/0012-notifications-Clear-notification-from-show-queue-if-.patch new file mode 100644 index 0000000..71a6d8c --- /dev/null +++ b/0012-notifications-Clear-notification-from-show-queue-if-.patch @@ -0,0 +1,47 @@ +From af3081abe2337c691cd2d310951ffd20f21da00d Mon Sep 17 00:00:00 2001 +From: Martin Klapetek +Date: Fri, 1 May 2015 14:54:47 +0200 +Subject: [PATCH 12/12] [notifications] Clear notification from show queue if + it's closed before it's shown + +It can happen that a notification is placed in the show queue and then +it's closed (eg. programatically) before it was even shown. In this case +the notification must be cleared from the show queue otherwise it will +get displayed and hidden but the popup is never freed for reuse, +resulting in notificaions starting at higher position from the panel. + +BUG: 342605 +--- + applets/notifications/plugin/notificationshelper.cpp | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/applets/notifications/plugin/notificationshelper.cpp b/applets/notifications/plugin/notificationshelper.cpp +index b56e3933bc5ee23bb53892126c5af91caee74cc6..e2880eb235d99f2a9930d648d3ccc5a296c4c354 100644 +--- a/applets/notifications/plugin/notificationshelper.cpp ++++ b/applets/notifications/plugin/notificationshelper.cpp +@@ -263,6 +263,22 @@ void NotificationsHelper::closePopup(const QString &sourceName) + bool shouldQueue = popup && !m_hideQueue.contains(popup); + m_mutex->unlock(); + ++ // Make sure the notification that was closed (programatically) ++ // is not in the show queue. This is important otherwise that ++ // notification will be shown and then never closed (because ++ // the close event arrives here, before it's even shown) ++ QMutableListIterator i(m_showQueue); ++ while (i.hasNext()) { ++ if (i.next().value("source") == sourceName) { ++ qDebug() << "########|" << " (locking mutex for write)"; ++ m_mutex->lockForWrite(); ++ qDebug() << "########|" << "Removing old data" << i.value().value("summary").toString(); ++ i.remove(); ++ m_mutex->unlock(); ++ qDebug() << "########|" << " (unlocking mutex)"; ++ } ++ } ++ + if (shouldQueue) { + m_mutex->lockForWrite(); + m_hideQueue.append(popup); +-- +2.3.5 + diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index 90ef7a1..3127988 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Sat May 2 10:20:55 UTC 2015 - hrvoje.senjan@gmail.com + +- Added patches from upstream: + 0001-Disable-indeterminate-animation-for-suspended-jobs.patch, + 0003-notifications-Replace-apos-with-as-apos-is-not-suppo.patch + (kde#346710), + 0004-Match-window-switch-dialog-borders-with-addwidgets-s.patch + (kde#345614), + 0005-Manually-keep-track-of-jobs-sources.patch (kde#346673), + 0006-Fix-running-applet-calculation.patch, + 0008-Only-restart-Timer-when-the-dialog-is-visible.patch, + 0009-check-for-model-existence.patch (kde#346870), + 0010-Fix-a-crash-in-PowermanagementEngine-populateApplica.patch, + 0011-notifications-Always-check-first-if-the-dispatch-tim.patch + and 0012-notifications-Clear-notification-from-show-queue-if-.patch + (kde#342605) + ------------------------------------------------------------------- Thu Apr 23 13:27:33 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index bc143dd..a4f8614 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -34,6 +34,16 @@ Patch1: create_kdehome.patch # PATCH-FIX_OPENSUSE 0003-Remove-export-of-QT_PLUGIN_PATH.patch -- we install plugins to directory known to Qt5, so export just pollutes both Qt4 and Qt5 plugins Patch2: 0003-Remove-export-of-QT_PLUGIN_PATH.patch # PATCHES 100-200 and above are from upstream 5.3 branch +Patch100: 0001-Disable-indeterminate-animation-for-suspended-jobs.patch +Patch101: 0003-notifications-Replace-apos-with-as-apos-is-not-suppo.patch +Patch102: 0004-Match-window-switch-dialog-borders-with-addwidgets-s.patch +Patch103: 0005-Manually-keep-track-of-jobs-sources.patch +Patch104: 0006-Fix-running-applet-calculation.patch +Patch105: 0008-Only-restart-Timer-when-the-dialog-is-visible.patch +Patch106: 0009-check-for-model-existence.patch +Patch107: 0010-Fix-a-crash-in-PowermanagementEngine-populateApplica.patch +Patch108: 0011-notifications-Always-check-first-if-the-dispatch-tim.patch +Patch109: 0012-notifications-Clear-notification-from-show-queue-if-.patch # PATCHES 201-300 and above are from upstream master/5.4 branch BuildRequires: alsa-devel BuildRequires: baloo5-devel >= %{version} @@ -191,6 +201,16 @@ workspace. Development files. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch100 -p1 +%patch101 -p1 +%patch102 -p1 +%patch103 -p1 +%patch104 -p1 +%patch105 -p1 +%patch106 -p1 +%patch107 -p1 +%patch108 -p1 +%patch109 -p1 %build %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5 From 10fc854bf8142b464872f4bd4d9fd7207df1e4410a3f8a4710f11a2d5141df8b Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sun, 17 May 2015 12:02:29 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=71 --- plasma5-workspace.changes | 6 ++++++ plasma5-workspace.spec | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index 3127988..4dce0d0 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun May 17 12:00:58 UTC 2015 - hrvoje.senjan@gmail.com + +- Require kactivities5 and kio-extras5 instead of just recommending, + they are essential enough that all users have it installed + ------------------------------------------------------------------- Sat May 2 10:20:55 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index a4f8614..114ea6e 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -129,10 +129,8 @@ Requires: oxygen5-sounds >= %{version} # hardcode versions of plasma-framework-componets and plasma-framework-private packages, as upstream doesn't keep backwards compability there %requires_ge plasma-framework-components %requires_ge plasma-framework-private -# de-facto even required... -Recommends: kactivities5 -# we want wallpaper previews -Recommends: kio-extras5 +Requires: kactivities5 +Requires: kio-extras5 # notifications... Recommends: phonon4qt5-backend # people should be able to adjust desktop From 62fbf04257d5ce0df6059b1cdf30a7efb24ba92a2b1717fb36713ebf96b2a873 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sun, 17 May 2015 17:00:39 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=72 --- plasma5-workspace.changes | 5 +++-- plasma5-workspace.spec | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index 4dce0d0..c1f0592 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,8 +1,9 @@ ------------------------------------------------------------------- Sun May 17 12:00:58 UTC 2015 - hrvoje.senjan@gmail.com -- Require kactivities5 and kio-extras5 instead of just recommending, - they are essential enough that all users have it installed +- Require kscreen5, kactivities5 and kio-extras5 instead of just + recommending, they are essential enough that all users have + it installed ------------------------------------------------------------------- Sat May 2 10:20:55 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index 114ea6e..d9f3298 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -123,6 +123,7 @@ Requires: kglobalaccel5 >= %{version} Requires: solid-imports # dialog/platformtheme/etc Requires: frameworkintegration-plugin +Requires: kscreen5 >= %{version} Requires: libkscreen2-plugin >= %{version} # boo#912317 Requires: oxygen5-sounds >= %{version}