summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-09-13 01:02:56 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2017-09-13 01:03:16 +0200
commitdee630a2584918c7ceb5ebf946ba3c4b161c4ea2 (patch)
tree7eecb3dfc58fb5a469145dd778c3ef9b13b8e4b1 /kde-frameworks/knotifications
parentnet-firewall/ufw-0.35-r1: ppc64 stable, bug 625084 (diff)
downloadgentoo-dee630a2584918c7ceb5ebf946ba3c4b161c4ea2.tar.gz
gentoo-dee630a2584918c7ceb5ebf946ba3c4b161c4ea2.tar.bz2
gentoo-dee630a2584918c7ceb5ebf946ba3c4b161c4ea2.zip
kde-frameworks/knotifications: Re-add missing patch
Reported-by: Latrina in #gentoo-kde Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'kde-frameworks/knotifications')
-rw-r--r--kde-frameworks/knotifications/files/knotifications-5.34.0-no-block-notification.patch101
1 files changed, 101 insertions, 0 deletions
diff --git a/kde-frameworks/knotifications/files/knotifications-5.34.0-no-block-notification.patch b/kde-frameworks/knotifications/files/knotifications-5.34.0-no-block-notification.patch
new file mode 100644
index 000000000000..2d1ae95af5fb
--- /dev/null
+++ b/kde-frameworks/knotifications/files/knotifications-5.34.0-no-block-notification.patch
@@ -0,0 +1,101 @@
+From 1c97e1d9741fd15962474f47932dd09728dae76b Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Fri, 28 Jul 2017 13:04:50 +0100
+Subject: [PATCH] Don't block starting notification service
+
+Summary:
+We don't need to manually start the DBus service.
+It blocks the calling app, and dbusServiceExists means that we will
+always end up going the DBus route over a popup anyway, so it won't
+do anything useful.
+
+The service (in the plasma case plasma-wait-for-name) will be started
+automatically when we actually send the notification.
+
+Also fix d-dbusServiceExists being cleared to false when the first
+service owner exits.
+
+BUG: 382444
+
+Subscribers: #frameworks
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D6963
+---
+ src/notifybypopup.cpp | 28 +++++++++++-----------------
+ 1 file changed, 11 insertions(+), 17 deletions(-)
+
+diff --git a/src/notifybypopup.cpp b/src/notifybypopup.cpp
+index 735d52b..4f244e1 100644
+--- a/src/notifybypopup.cpp
++++ b/src/notifybypopup.cpp
+@@ -109,6 +109,9 @@ public:
+ * Specifies if DBus Notifications interface exists on session bus
+ */
+ bool dbusServiceExists;
++
++ bool dbusServiceActivatable;
++
+ /**
+ * DBus notification daemon capabilities cache.
+ * Do not use this variable. Use #popupServerCapabilities() instead.
+@@ -161,6 +164,7 @@ NotifyByPopup::NotifyByPopup(QObject *parent)
+ {
+ d->animationTimer = 0;
+ d->dbusServiceExists = false;
++ d->dbusServiceActivatable = false;
+ d->dbusServiceCapCacheDirty = true;
+ d->nextPosition = -1;
+
+@@ -180,32 +184,20 @@ NotifyByPopup::NotifyByPopup(QObject *parent)
+ connect(watcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)),
+ SLOT(onServiceOwnerChanged(QString,QString,QString)));
+
++#ifndef Q_WS_WIN
+ if (!d->dbusServiceExists) {
+- bool startfdo = false;
+-#ifdef Q_WS_WIN
+- startfdo = true;
+-#else
+ QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.DBus"),
+ QStringLiteral("/org/freedesktop/DBus"),
+ QStringLiteral("org.freedesktop.DBus"),
+ QStringLiteral("ListActivatableNames"));
+-
+- // FIXME - this should be async
+ QDBusReply<QStringList> reply = QDBusConnection::sessionBus().call(message);
+ if (reply.isValid() && reply.value().contains(dbusServiceName)) {
+- startfdo = true;
+- // We need to set d->dbusServiceExists to true because dbus might be too slow
+- // starting the service and the first call to NotifyByPopup::notify
+- // might not have had the service up, by setting this to true we
+- // guarantee it will still go through dbus and dbus will do the correct
+- // thing and wait for the service to go up
++ d->dbusServiceActivatable = true;
++ //if the service is activatable, we can assume it exists even if it is not currently running
+ d->dbusServiceExists = true;
+ }
+-#endif
+- if (startfdo) {
+- QDBusConnection::sessionBus().interface()->startService(dbusServiceName);
+- }
+ }
++#endif
+ }
+
+
+@@ -439,7 +431,9 @@ void NotifyByPopup::onServiceOwnerChanged(const QString &serviceName, const QStr
+
+ if (newOwner.isEmpty()) {
+ d->notificationQueue.clear();
+- d->dbusServiceExists = false;
++ if (!d->dbusServiceActivatable) {
++ d->dbusServiceExists = false;
++ }
+ } else if (oldOwner.isEmpty()) {
+ d->dbusServiceExists = true;
+
+--
+2.13.5
+