1 |
commit: dee630a2584918c7ceb5ebf946ba3c4b161c4ea2 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 12 23:02:56 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 12 23:03:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dee630a2 |
7 |
|
8 |
kde-frameworks/knotifications: Re-add missing patch |
9 |
|
10 |
Reported-by: Latrina in #gentoo-kde |
11 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
12 |
|
13 |
...otifications-5.34.0-no-block-notification.patch | 101 +++++++++++++++++++++ |
14 |
1 file changed, 101 insertions(+) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 00000000000..2d1ae95af5f |
19 |
--- /dev/null |
20 |
+++ b/kde-frameworks/knotifications/files/knotifications-5.34.0-no-block-notification.patch |
21 |
@@ -0,0 +1,101 @@ |
22 |
+From 1c97e1d9741fd15962474f47932dd09728dae76b Mon Sep 17 00:00:00 2001 |
23 |
+From: David Edmundson <kde@×××××××××××××××××.uk> |
24 |
+Date: Fri, 28 Jul 2017 13:04:50 +0100 |
25 |
+Subject: [PATCH] Don't block starting notification service |
26 |
+ |
27 |
+Summary: |
28 |
+We don't need to manually start the DBus service. |
29 |
+It blocks the calling app, and dbusServiceExists means that we will |
30 |
+always end up going the DBus route over a popup anyway, so it won't |
31 |
+do anything useful. |
32 |
+ |
33 |
+The service (in the plasma case plasma-wait-for-name) will be started |
34 |
+automatically when we actually send the notification. |
35 |
+ |
36 |
+Also fix d-dbusServiceExists being cleared to false when the first |
37 |
+service owner exits. |
38 |
+ |
39 |
+BUG: 382444 |
40 |
+ |
41 |
+Subscribers: #frameworks |
42 |
+ |
43 |
+Tags: #frameworks |
44 |
+ |
45 |
+Differential Revision: https://phabricator.kde.org/D6963 |
46 |
+--- |
47 |
+ src/notifybypopup.cpp | 28 +++++++++++----------------- |
48 |
+ 1 file changed, 11 insertions(+), 17 deletions(-) |
49 |
+ |
50 |
+diff --git a/src/notifybypopup.cpp b/src/notifybypopup.cpp |
51 |
+index 735d52b..4f244e1 100644 |
52 |
+--- a/src/notifybypopup.cpp |
53 |
++++ b/src/notifybypopup.cpp |
54 |
+@@ -109,6 +109,9 @@ public: |
55 |
+ * Specifies if DBus Notifications interface exists on session bus |
56 |
+ */ |
57 |
+ bool dbusServiceExists; |
58 |
++ |
59 |
++ bool dbusServiceActivatable; |
60 |
++ |
61 |
+ /** |
62 |
+ * DBus notification daemon capabilities cache. |
63 |
+ * Do not use this variable. Use #popupServerCapabilities() instead. |
64 |
+@@ -161,6 +164,7 @@ NotifyByPopup::NotifyByPopup(QObject *parent) |
65 |
+ { |
66 |
+ d->animationTimer = 0; |
67 |
+ d->dbusServiceExists = false; |
68 |
++ d->dbusServiceActivatable = false; |
69 |
+ d->dbusServiceCapCacheDirty = true; |
70 |
+ d->nextPosition = -1; |
71 |
+ |
72 |
+@@ -180,32 +184,20 @@ NotifyByPopup::NotifyByPopup(QObject *parent) |
73 |
+ connect(watcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)), |
74 |
+ SLOT(onServiceOwnerChanged(QString,QString,QString))); |
75 |
+ |
76 |
++#ifndef Q_WS_WIN |
77 |
+ if (!d->dbusServiceExists) { |
78 |
+- bool startfdo = false; |
79 |
+-#ifdef Q_WS_WIN |
80 |
+- startfdo = true; |
81 |
+-#else |
82 |
+ QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.DBus"), |
83 |
+ QStringLiteral("/org/freedesktop/DBus"), |
84 |
+ QStringLiteral("org.freedesktop.DBus"), |
85 |
+ QStringLiteral("ListActivatableNames")); |
86 |
+- |
87 |
+- // FIXME - this should be async |
88 |
+ QDBusReply<QStringList> reply = QDBusConnection::sessionBus().call(message); |
89 |
+ if (reply.isValid() && reply.value().contains(dbusServiceName)) { |
90 |
+- startfdo = true; |
91 |
+- // We need to set d->dbusServiceExists to true because dbus might be too slow |
92 |
+- // starting the service and the first call to NotifyByPopup::notify |
93 |
+- // might not have had the service up, by setting this to true we |
94 |
+- // guarantee it will still go through dbus and dbus will do the correct |
95 |
+- // thing and wait for the service to go up |
96 |
++ d->dbusServiceActivatable = true; |
97 |
++ //if the service is activatable, we can assume it exists even if it is not currently running |
98 |
+ d->dbusServiceExists = true; |
99 |
+ } |
100 |
+-#endif |
101 |
+- if (startfdo) { |
102 |
+- QDBusConnection::sessionBus().interface()->startService(dbusServiceName); |
103 |
+- } |
104 |
+ } |
105 |
++#endif |
106 |
+ } |
107 |
+ |
108 |
+ |
109 |
+@@ -439,7 +431,9 @@ void NotifyByPopup::onServiceOwnerChanged(const QString &serviceName, const QStr |
110 |
+ |
111 |
+ if (newOwner.isEmpty()) { |
112 |
+ d->notificationQueue.clear(); |
113 |
+- d->dbusServiceExists = false; |
114 |
++ if (!d->dbusServiceActivatable) { |
115 |
++ d->dbusServiceExists = false; |
116 |
++ } |
117 |
+ } else if (oldOwner.isEmpty()) { |
118 |
+ d->dbusServiceExists = true; |
119 |
+ |
120 |
+-- |
121 |
+2.13.5 |
122 |
+ |