1 |
commit: 1fde9bdcfb26c7bb0ae09d9954106108a203bd36 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 25 09:18:30 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 30 01:42:30 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fde9bdc |
7 |
|
8 |
kde-plasma/plasma-workspace: backport upstream fixes for 5.25.5 |
9 |
|
10 |
Upstream commit: 432d7c4b51c5a1f17af327d770266b3fe81e5ae5 |
11 |
Upstream commit: d693026676cc6bf2b7c23e9ff4b620679cf15d10 |
12 |
Upstream commit: 0a01c8910309fb9f289fe0aa58492e106d154548 |
13 |
Upstream commit: f30431c9ed0bb70506cbc72ea337323660a0dc14 |
14 |
Upstream commit: b983f1c758552346083ffe0b3d47173b487ae426 |
15 |
|
16 |
KDE-bug: https://bugs.kde.org/420245 |
17 |
KDE-bug: https://bugs.kde.org/449984 |
18 |
KDE-bug: https://bugs.kde.org/457341 |
19 |
KDE-bug: https://bugs.kde.org/413645 |
20 |
Bug: https://bugs.gentoo.org/883289 |
21 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
22 |
|
23 |
...sma-workspace-5.25.5-geolocation-deadlock.patch | 194 +++++++++++++++++ |
24 |
.../plasma-workspace-5.25.5-layout-save.patch | 33 +++ |
25 |
.../plasma-workspace-5.25.5-lock-layout.patch | 113 ++++++++++ |
26 |
...ace-5.25.5-prevent-panel-go-out-of-screen.patch | 8 - |
27 |
.../files/plasma-workspace-5.25.5-relayout.patch | 22 ++ |
28 |
...a-workspace-5.25.5-systray-double-destroy.patch | 24 +++ |
29 |
.../plasma-workspace-5.25.5-r5.ebuild | 229 +++++++++++++++++++++ |
30 |
7 files changed, 615 insertions(+), 8 deletions(-) |
31 |
|
32 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-geolocation-deadlock.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-geolocation-deadlock.patch |
33 |
new file mode 100644 |
34 |
index 000000000000..70bd28419472 |
35 |
--- /dev/null |
36 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-geolocation-deadlock.patch |
37 |
@@ -0,0 +1,194 @@ |
38 |
+https://invent.kde.org/plasma/plasma-workspace/-/commit/d693026676cc6bf2b7c23e9ff4b620679cf15d10 |
39 |
+ |
40 |
+From d693026676cc6bf2b7c23e9ff4b620679cf15d10 Mon Sep 17 00:00:00 2001 |
41 |
+From: Nicolas Fella <nicolas.fella@×××.de> |
42 |
+Date: Mon, 15 Aug 2022 18:36:56 +0200 |
43 |
+Subject: [PATCH] [dataengines/geolocation] Port from KIO::http_post to |
44 |
+ QNetworkAccessManager |
45 |
+ |
46 |
+Not only does this slightly simplify the code, it also avoids a deadlock in kded when automatic proxy detection is enabled |
47 |
+ |
48 |
+BUG: 449984 |
49 |
+ |
50 |
+BUG: 457341 |
51 |
+(cherry picked from commit 98cadd48c21c89b81fdeb3499a557a6551a09d8a) |
52 |
+--- |
53 |
+ dataengines/geolocation/CMakeLists.txt | 2 +- |
54 |
+ dataengines/geolocation/location_ip.cpp | 84 ++++++++++--------------- |
55 |
+ 2 files changed, 35 insertions(+), 51 deletions(-) |
56 |
+ |
57 |
+diff --git a/dataengines/geolocation/CMakeLists.txt b/dataengines/geolocation/CMakeLists.txt |
58 |
+index 175687bd4d..6ae707643c 100644 |
59 |
+--- a/dataengines/geolocation/CMakeLists.txt |
60 |
++++ b/dataengines/geolocation/CMakeLists.txt |
61 |
+@@ -36,7 +36,7 @@ target_link_libraries(plasma_engine_geolocation |
62 |
+ kcoreaddons_add_plugin(plasma-geolocation-ip SOURCES location_ip.cpp INSTALL_NAMESPACE plasma/geolocationprovider) |
63 |
+ ecm_qt_declare_logging_category(plasma-geolocation-ip HEADER geolocdebug.h IDENTIFIER DATAENGINE_GEOLOCATION CATEGORY_NAME org.kde.plasma.dataengine.geolocation) |
64 |
+ target_compile_definitions(plasma-geolocation-ip PRIVATE -DQT_NO_KEYWORDS) |
65 |
+-target_link_libraries(plasma-geolocation-ip plasma-geolocation-interface KF5::KIOCore KF5::NetworkManagerQt) |
66 |
++target_link_libraries(plasma-geolocation-ip plasma-geolocation-interface KF5::NetworkManagerQt) |
67 |
+ |
68 |
+ pkg_check_modules(LIBGPS libgps IMPORTED_TARGET) |
69 |
+ |
70 |
+diff --git a/dataengines/geolocation/location_ip.cpp b/dataengines/geolocation/location_ip.cpp |
71 |
+index 27b530810c..3c5a202b89 100644 |
72 |
+--- a/dataengines/geolocation/location_ip.cpp |
73 |
++++ b/dataengines/geolocation/location_ip.cpp |
74 |
+@@ -12,15 +12,14 @@ |
75 |
+ |
76 |
+ #include "location_ip.h" |
77 |
+ #include "geolocdebug.h" |
78 |
+-#include <KIO/Job> |
79 |
+-#include <KIO/TransferJob> |
80 |
+-#include <KJob> |
81 |
+ #include <KSharedConfig> |
82 |
+ #include <NetworkManagerQt/Manager> |
83 |
+ #include <NetworkManagerQt/WirelessDevice> |
84 |
+ #include <QJsonArray> |
85 |
+ #include <QJsonDocument> |
86 |
+ #include <QJsonObject> |
87 |
++#include <QNetworkAccessManager> |
88 |
++#include <QNetworkReply> |
89 |
+ #include <QUrl> |
90 |
+ |
91 |
+ class Ip::Private : public QObject |
92 |
+@@ -30,19 +29,21 @@ public: |
93 |
+ Private(Ip *q) |
94 |
+ : q(q) |
95 |
+ { |
96 |
++ m_nam.setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy); |
97 |
++ m_nam.setStrictTransportSecurityEnabled(true); |
98 |
++ m_nam.enableStrictTransportSecurityStore(true, |
99 |
++ QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/plasmashell/hsts/")); |
100 |
+ } |
101 |
+ |
102 |
+- void readGeoLocation(KJob *job) |
103 |
++ void readGeoLocation(QNetworkReply *reply) |
104 |
+ { |
105 |
+ m_geoLocationResolved = true; |
106 |
+- if (job && job->error()) { |
107 |
+- qCCritical(DATAENGINE_GEOLOCATION) << "error: " << job->errorString(); |
108 |
+- m_geoLocationPayload.clear(); |
109 |
++ if (reply->error()) { |
110 |
++ qCCritical(DATAENGINE_GEOLOCATION) << "error: " << reply->errorString(); |
111 |
+ checkUpdateData(); |
112 |
+ return; |
113 |
+ } |
114 |
+- const QJsonObject json = QJsonDocument::fromJson(m_geoLocationPayload).object(); |
115 |
+- m_geoLocationPayload.clear(); |
116 |
++ const QJsonObject json = QJsonDocument::fromJson(reply->readAll()).object(); |
117 |
+ |
118 |
+ auto accuracyIt = json.find(QStringLiteral("accuracy")); |
119 |
+ if (accuracyIt != json.end()) { |
120 |
+@@ -62,52 +63,28 @@ public: |
121 |
+ |
122 |
+ void clear() |
123 |
+ { |
124 |
+- m_geoLocationPayload.clear(); |
125 |
+- m_countryPayload.clear(); |
126 |
+ m_countryResolved = false; |
127 |
+ m_geoLocationResolved = false; |
128 |
+ m_data.clear(); |
129 |
+ } |
130 |
+ |
131 |
+- void geoLocationData(KIO::Job *job, const QByteArray &data) |
132 |
+- { |
133 |
+- Q_UNUSED(job) |
134 |
+- |
135 |
+- if (data.isEmpty()) { |
136 |
+- return; |
137 |
+- } |
138 |
+- m_geoLocationPayload.append(data); |
139 |
+- } |
140 |
+- |
141 |
+- void countryData(KIO::Job *job, const QByteArray &data) |
142 |
+- { |
143 |
+- Q_UNUSED(job) |
144 |
+- |
145 |
+- if (data.isEmpty()) { |
146 |
+- return; |
147 |
+- } |
148 |
+- m_countryPayload.append(data); |
149 |
+- } |
150 |
+- |
151 |
+- void readCountry(KJob *job) |
152 |
++ void readCountry(QNetworkReply *reply) |
153 |
+ { |
154 |
+ m_countryResolved = true; |
155 |
+- if (job && job->error()) { |
156 |
+- qCCritical(DATAENGINE_GEOLOCATION) << "error: " << job->errorString(); |
157 |
+- m_countryPayload.clear(); |
158 |
++ if (reply->error()) { |
159 |
++ qCCritical(DATAENGINE_GEOLOCATION) << "error: " << reply->errorString(); |
160 |
+ checkUpdateData(); |
161 |
+ return; |
162 |
+ } |
163 |
+ |
164 |
+- const QJsonObject json = QJsonDocument::fromJson(m_countryPayload).object(); |
165 |
+- m_countryPayload.clear(); |
166 |
++ const QJsonObject json = QJsonDocument::fromJson(reply->readAll()).object(); |
167 |
+ |
168 |
+ m_data[QStringLiteral("country")] = json.value(QStringLiteral("country_name")).toString(); |
169 |
+ m_data[QStringLiteral("country code")] = json.value(QStringLiteral("country_code")).toString(); |
170 |
++ |
171 |
+ checkUpdateData(); |
172 |
+ } |
173 |
+ |
174 |
+-private: |
175 |
+ void checkUpdateData() |
176 |
+ { |
177 |
+ if (!m_countryResolved || !m_geoLocationResolved) { |
178 |
+@@ -117,11 +94,10 @@ private: |
179 |
+ } |
180 |
+ |
181 |
+ Ip *q; |
182 |
+- QByteArray m_geoLocationPayload; |
183 |
+- QByteArray m_countryPayload; |
184 |
+ bool m_countryResolved = false; |
185 |
+ bool m_geoLocationResolved = false; |
186 |
+ Plasma::DataEngine::Data m_data; |
187 |
++ QNetworkAccessManager m_nam; |
188 |
+ }; |
189 |
+ |
190 |
+ Ip::Ip(QObject *parent, const QVariantList &args) |
191 |
+@@ -176,18 +152,26 @@ void Ip::update() |
192 |
+ } |
193 |
+ const QByteArray postData = QJsonDocument(request).toJson(QJsonDocument::Compact); |
194 |
+ const QString apiKey = QStringLiteral("60e8eae6-3988-4ada-ad48-2cfddddf216b"); |
195 |
+- KIO::TransferJob *datajob = |
196 |
+- KIO::http_post(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/geolocate?key=%1").arg(apiKey)), postData, KIO::HideProgressInfo); |
197 |
+- datajob->addMetaData(QStringLiteral("content-type"), QStringLiteral("application/json")); |
198 |
+ |
199 |
+ qCDebug(DATAENGINE_GEOLOCATION) << "Fetching https://location.services.mozilla.com/v1/geolocate"; |
200 |
+- connect(datajob, &KIO::TransferJob::data, d, &Ip::Private::geoLocationData); |
201 |
+- connect(datajob, &KIO::TransferJob::result, d, &Ip::Private::readGeoLocation); |
202 |
+- |
203 |
+- datajob = KIO::http_post(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/country?key=%1").arg(apiKey)), postData, KIO::HideProgressInfo); |
204 |
+- datajob->addMetaData(QStringLiteral("content-type"), QStringLiteral("application/json")); |
205 |
+- connect(datajob, &KIO::TransferJob::data, d, &Ip::Private::countryData); |
206 |
+- connect(datajob, &KIO::TransferJob::result, d, &Ip::Private::readCountry); |
207 |
++ QNetworkRequest locationRequest(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/geolocate?key=%1").arg(apiKey))); |
208 |
++ locationRequest.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/json")); |
209 |
++ QNetworkReply *locationReply = d->m_nam.post(locationRequest, postData); |
210 |
++ |
211 |
++ connect(locationReply, &QNetworkReply::finished, this, [this, locationReply] { |
212 |
++ locationReply->deleteLater(); |
213 |
++ d->readGeoLocation(locationReply); |
214 |
++ }); |
215 |
++ |
216 |
++ qCDebug(DATAENGINE_GEOLOCATION) << "Fetching https://location.services.mozilla.com/v1/country"; |
217 |
++ QNetworkRequest countryRequest(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/country?key=%1").arg(apiKey))); |
218 |
++ countryRequest.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/json")); |
219 |
++ QNetworkReply *countryReply = d->m_nam.post(countryRequest, postData); |
220 |
++ |
221 |
++ connect(countryReply, &QNetworkReply::finished, this, [this, countryReply] { |
222 |
++ countryReply->deleteLater(); |
223 |
++ d->readCountry(countryReply); |
224 |
++ }); |
225 |
+ } |
226 |
+ |
227 |
+ K_PLUGIN_CLASS_WITH_JSON(Ip, "plasma-geolocation-ip.json") |
228 |
+-- |
229 |
+GitLab |
230 |
+ |
231 |
+ |
232 |
|
233 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-layout-save.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-layout-save.patch |
234 |
new file mode 100644 |
235 |
index 000000000000..ed298549128a |
236 |
--- /dev/null |
237 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-layout-save.patch |
238 |
@@ -0,0 +1,33 @@ |
239 |
+https://invent.kde.org/plasma/plasma-workspace/-/commit/b983f1c758552346083ffe0b3d47173b487ae426 |
240 |
+ |
241 |
+From b983f1c758552346083ffe0b3d47173b487ae426 Mon Sep 17 00:00:00 2001 |
242 |
+From: Aaron Rainbolt <arraybolt3@×××××.com> |
243 |
+Date: Wed, 19 Oct 2022 14:16:26 -0500 |
244 |
+Subject: [PATCH] Save layout immediately after a resolution change triggered |
245 |
+ relayout |
246 |
+ |
247 |
+(cherry picked from commit f33cd92fbfb765299018bddc2a86ac5326731231) |
248 |
+--- |
249 |
+ components/containmentlayoutmanager/appletslayout.cpp | 5 +++++ |
250 |
+ 1 file changed, 5 insertions(+) |
251 |
+ |
252 |
+diff --git a/components/containmentlayoutmanager/appletslayout.cpp b/components/containmentlayoutmanager/appletslayout.cpp |
253 |
+index 70970e8919..c3e957cbd9 100644 |
254 |
+--- a/components/containmentlayoutmanager/appletslayout.cpp |
255 |
++++ b/components/containmentlayoutmanager/appletslayout.cpp |
256 |
+@@ -80,6 +80,11 @@ AppletsLayout::AppletsLayout(QQuickItem *parent) |
257 |
+ } else if (!m_geometryBeforeResolutionChange.isEmpty()) { |
258 |
+ m_layoutManager->layoutGeometryChanged(newGeom, m_geometryBeforeResolutionChange); |
259 |
+ m_geometryBeforeResolutionChange = QRectF(); |
260 |
++ |
261 |
++ // If the user doesn't move a widget after this is done, the widget positions won't be saved and they will be in the wrong |
262 |
++ // places on next login, so save them now. |
263 |
++ |
264 |
++ save(); |
265 |
+ } |
266 |
+ } |
267 |
+ m_layoutChanges = NoChange; |
268 |
+-- |
269 |
+GitLab |
270 |
+ |
271 |
+ |
272 |
|
273 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-lock-layout.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-lock-layout.patch |
274 |
new file mode 100644 |
275 |
index 000000000000..422b22a678dd |
276 |
--- /dev/null |
277 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-lock-layout.patch |
278 |
@@ -0,0 +1,113 @@ |
279 |
+https://invent.kde.org/plasma/plasma-workspace/-/commit/0a01c8910309fb9f289fe0aa58492e106d154548 |
280 |
+ |
281 |
+From 0a01c8910309fb9f289fe0aa58492e106d154548 Mon Sep 17 00:00:00 2001 |
282 |
+From: Marco Martin <notmart@×××××.com> |
283 |
+Date: Sun, 25 Sep 2022 16:47:31 -0500 |
284 |
+Subject: [PATCH] Introduce a lock that blocks relayouts and config writes |
285 |
+ |
286 |
+The resize of the layout area can happen either by screen resolution |
287 |
+change or available screen area change (a panel appears or is resized) |
288 |
+This is not an atomic operation, as width and height are usually set in |
289 |
+2 different operations, and even worse the layout area is resized to |
290 |
+ match the available one with an animation, so many intermediate resizes |
291 |
+that should never cause a relayout happen. |
292 |
+In normal operation an event compression timer limits the actual |
293 |
+relayouts to hopefully one, but if the system is really slowed down |
294 |
+(for instance, startup) the timer may expire and cause relayouts in |
295 |
+non useful sizes, losing the needed configuration |
296 |
+In combination with |
297 |
+ |
298 |
+The lock blocks all relayout and config writes when the size of the |
299 |
+layout area doesn't correspond to corona availablescreenrect, which are |
300 |
+the only "settled" cases. |
301 |
+ |
302 |
+BUG:413645 |
303 |
+--- a/components/containmentlayoutmanager/appletslayout.cpp |
304 |
++++ b/components/containmentlayoutmanager/appletslayout.cpp |
305 |
+@@ -56,9 +56,10 @@ AppletsLayout::AppletsLayout(QQuickItem *parent) |
306 |
+ connect(m_layoutChangeTimer, &QTimer::timeout, this, [this]() { |
307 |
+ // We can't assume m_containment to be valid: if we load in a plasmoid that can run also |
308 |
+ // in "applet" mode, m_containment will never be valid |
309 |
+- if (!m_containment) { |
310 |
++ if (!m_containment || width() <= 0 || height() <= 0 || m_relayoutLock) { |
311 |
+ return; |
312 |
+ } |
313 |
++ |
314 |
+ const QString &serializedConfig = m_containment->config().readEntry(m_configKey, ""); |
315 |
+ if ((m_layoutChanges & ConfigKeyChange) && !serializedConfig.isEmpty()) { |
316 |
+ if (!m_configKey.isEmpty() && m_containment) { |
317 |
+@@ -169,6 +170,27 @@ void AppletsLayout::setFallbackConfigKey(const QString &key) |
318 |
+ Q_EMIT fallbackConfigKeyChanged(); |
319 |
+ } |
320 |
+ |
321 |
++bool AppletsLayout::relayoutLock() const |
322 |
++{ |
323 |
++ return m_relayoutLock; |
324 |
++} |
325 |
++ |
326 |
++void AppletsLayout::setRelayoutLock(bool lock) |
327 |
++{ |
328 |
++ if (lock == m_relayoutLock) { |
329 |
++ return; |
330 |
++ } |
331 |
++ |
332 |
++ m_relayoutLock = lock; |
333 |
++ |
334 |
++ if (!lock && m_layoutChanges != NoChange) { |
335 |
++ m_layoutChangeTimer->start(); |
336 |
++ } |
337 |
++ |
338 |
++ Q_EMIT relayoutLockChanged(); |
339 |
++} |
340 |
++ |
341 |
++ |
342 |
+ QJSValue AppletsLayout::acceptsAppletCallback() const |
343 |
+ { |
344 |
+ return m_acceptsAppletCallback; |
345 |
+@@ -468,7 +490,7 @@ void AppletsLayout::geometryChanged(const QRectF &newGeometry, const QRectF &old |
346 |
+ } |
347 |
+ |
348 |
+ // Only do a layouting procedure if we received a valid size |
349 |
+- if (!newGeometry.isEmpty()) { |
350 |
++ if (!newGeometry.isEmpty() && newGeometry != oldGeometry) { |
351 |
+ m_layoutChanges |= SizeChange; |
352 |
+ m_layoutChangeTimer->start(); |
353 |
+ } |
354 |
+--- a/components/containmentlayoutmanager/appletslayout.h |
355 |
++++ b/components/containmentlayoutmanager/appletslayout.h |
356 |
+@@ -39,6 +39,8 @@ class AppletsLayout : public QQuickItem |
357 |
+ // from the screen size and plasma starts on an "unexpected" size |
358 |
+ Q_PROPERTY(QString fallbackConfigKey READ fallbackConfigKey WRITE setFallbackConfigKey NOTIFY fallbackConfigKeyChanged) |
359 |
+ |
360 |
++ Q_PROPERTY(bool relayoutLock READ relayoutLock WRITE setRelayoutLock NOTIFY relayoutLockChanged) |
361 |
++ |
362 |
+ Q_PROPERTY(PlasmaQuick::AppletQuickItem *containment READ containment WRITE setContainment NOTIFY containmentChanged) |
363 |
+ |
364 |
+ Q_PROPERTY(QJSValue acceptsAppletCallback READ acceptsAppletCallback WRITE setAcceptsAppletCallback NOTIFY acceptsAppletCallbackChanged) |
365 |
+@@ -103,6 +105,9 @@ public: |
366 |
+ QString fallbackConfigKey() const; |
367 |
+ void setFallbackConfigKey(const QString &key); |
368 |
+ |
369 |
++ bool relayoutLock() const; |
370 |
++ void setRelayoutLock(bool lock); |
371 |
++ |
372 |
+ PlasmaQuick::AppletQuickItem *containment() const; |
373 |
+ void setContainment(PlasmaQuick::AppletQuickItem *containment); |
374 |
+ |
375 |
+@@ -162,6 +167,7 @@ Q_SIGNALS: |
376 |
+ |
377 |
+ void configKeyChanged(); |
378 |
+ void fallbackConfigKeyChanged(); |
379 |
++ void relayoutLockChanged(); |
380 |
+ void containmentChanged(); |
381 |
+ void minimumItemWidthChanged(); |
382 |
+ void minimumItemHeightChanged(); |
383 |
+@@ -226,6 +232,7 @@ private: |
384 |
+ QPointF m_mouseDownPosition = QPoint(-1, -1); |
385 |
+ bool m_mouseDownWasEditMode = false; |
386 |
+ bool m_editMode = false; |
387 |
++ bool m_relayoutLock = false; |
388 |
+ }; |
389 |
+ |
390 |
+ Q_DECLARE_OPERATORS_FOR_FLAGS(AppletsLayout::LayoutChanges) |
391 |
+GitLab |
392 |
|
393 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-prevent-panel-go-out-of-screen.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-prevent-panel-go-out-of-screen.patch |
394 |
index 457470f0807c..ef94ed3afa00 100644 |
395 |
--- a/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-prevent-panel-go-out-of-screen.patch |
396 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-prevent-panel-go-out-of-screen.patch |
397 |
@@ -10,12 +10,6 @@ There is still a known culprit (duplicate display names) so the hack shouldn't b |
398 |
|
399 |
CCBUG: 353975 |
400 |
CCBUG: 438114 |
401 |
---- |
402 |
- shell/panelview.cpp | 3 +++ |
403 |
- 1 file changed, 3 insertions(+) |
404 |
- |
405 |
-diff --git a/shell/panelview.cpp b/shell/panelview.cpp |
406 |
-index b5c87bbf71..4be1e26ca4 100644 |
407 |
--- a/shell/panelview.cpp |
408 |
+++ b/shell/panelview.cpp |
409 |
@@ -859,6 +859,9 @@ void PanelView::moveEvent(QMoveEvent *ev) |
410 |
@@ -28,6 +22,4 @@ index b5c87bbf71..4be1e26ca4 100644 |
411 |
} |
412 |
|
413 |
void PanelView::keyPressEvent(QKeyEvent *event) |
414 |
--- |
415 |
GitLab |
416 |
- |
417 |
|
418 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-relayout.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-relayout.patch |
419 |
new file mode 100644 |
420 |
index 000000000000..efd211c26de4 |
421 |
--- /dev/null |
422 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-relayout.patch |
423 |
@@ -0,0 +1,22 @@ |
424 |
+https://invent.kde.org/plasma/plasma-workspace/-/commit/f30431c9ed0bb70506cbc72ea337323660a0dc14 |
425 |
+ |
426 |
+From f30431c9ed0bb70506cbc72ea337323660a0dc14 Mon Sep 17 00:00:00 2001 |
427 |
+From: Aaron Rainbolt <arraybolt3@×××××.com> |
428 |
+Date: Wed, 19 Oct 2022 14:15:16 -0500 |
429 |
+Subject: [PATCH] Remove unnecessary heuristic relayout function call |
430 |
+ |
431 |
+(cherry picked from commit c344410a061862dd4802581a1ac3b9a09758ace0) |
432 |
+--- a/components/containmentlayoutmanager/appletslayout.cpp |
433 |
++++ b/components/containmentlayoutmanager/appletslayout.cpp |
434 |
+@@ -80,10 +80,6 @@ AppletsLayout::AppletsLayout(QQuickItem *parent) |
435 |
+ } else if (!m_geometryBeforeResolutionChange.isEmpty()) { |
436 |
+ m_layoutManager->layoutGeometryChanged(newGeom, m_geometryBeforeResolutionChange); |
437 |
+ m_geometryBeforeResolutionChange = QRectF(); |
438 |
+- |
439 |
+- // Heuristically relayout items only when the plasma startup is fully completed |
440 |
+- } else { |
441 |
+- polish(); |
442 |
+ } |
443 |
+ } |
444 |
+ m_layoutChanges = NoChange; |
445 |
+GitLab |
446 |
|
447 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-systray-double-destroy.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-systray-double-destroy.patch |
448 |
new file mode 100644 |
449 |
index 000000000000..3719f2dcae7a |
450 |
--- /dev/null |
451 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-systray-double-destroy.patch |
452 |
@@ -0,0 +1,24 @@ |
453 |
+https://invent.kde.org/plasma/plasma-workspace/-/commit/432d7c4b51c5a1f17af327d770266b3fe81e5ae5 |
454 |
+ |
455 |
+From 432d7c4b51c5a1f17af327d770266b3fe81e5ae5 Mon Sep 17 00:00:00 2001 |
456 |
+From: Nicolas Fella <nicolas.fella@×××.de> |
457 |
+Date: Tue, 27 Sep 2022 18:04:51 +0200 |
458 |
+Subject: [PATCH] [applets/systemtray] Don't manually destroy innerContainment |
459 |
+ |
460 |
+It's already destroyed by the corona |
461 |
+ |
462 |
+BUG: 420245 |
463 |
+(cherry picked from commit 7baa4c221e45f161adf4e00d4cf0e36d6436e90c) |
464 |
+--- a/applets/systemtray/container/systemtraycontainer.cpp |
465 |
++++ b/applets/systemtray/container/systemtraycontainer.cpp |
466 |
+@@ -20,9 +20,6 @@ SystemTrayContainer::SystemTrayContainer(QObject *parent, const KPluginMetaData |
467 |
+ |
468 |
+ SystemTrayContainer::~SystemTrayContainer() |
469 |
+ { |
470 |
+- if (destroyed()) { |
471 |
+- m_innerContainment->destroy(); |
472 |
+- } |
473 |
+ } |
474 |
+ |
475 |
+ void SystemTrayContainer::init() |
476 |
+GitLab |
477 |
|
478 |
diff --git a/kde-plasma/plasma-workspace/plasma-workspace-5.25.5-r5.ebuild b/kde-plasma/plasma-workspace/plasma-workspace-5.25.5-r5.ebuild |
479 |
new file mode 100644 |
480 |
index 000000000000..973ec86a90e6 |
481 |
--- /dev/null |
482 |
+++ b/kde-plasma/plasma-workspace/plasma-workspace-5.25.5-r5.ebuild |
483 |
@@ -0,0 +1,229 @@ |
484 |
+# Copyright 1999-2022 Gentoo Authors |
485 |
+# Distributed under the terms of the GNU General Public License v2 |
486 |
+ |
487 |
+EAPI=8 |
488 |
+ |
489 |
+ECM_HANDBOOK="optional" |
490 |
+ECM_TEST="forceoptional" |
491 |
+KFMIN=5.99.0 |
492 |
+PVCUT=$(ver_cut 1-3) |
493 |
+QTMIN=5.15.5 |
494 |
+VIRTUALX_REQUIRED="test" |
495 |
+inherit ecm plasma.kde.org |
496 |
+ |
497 |
+DESCRIPTION="KDE Plasma workspace" |
498 |
+ |
499 |
+LICENSE="GPL-2" # TODO: CHECK |
500 |
+SLOT="5" |
501 |
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" |
502 |
+IUSE="appstream +calendar +fontconfig geolocation gps +policykit |
503 |
+screencast +semantic-desktop telemetry" |
504 |
+ |
505 |
+REQUIRED_USE="gps? ( geolocation )" |
506 |
+RESTRICT="test" |
507 |
+ |
508 |
+# slot op: various private QtWaylandClient headers |
509 |
+COMMON_DEPEND=" |
510 |
+ dev-libs/icu:= |
511 |
+ >=dev-libs/wayland-1.15 |
512 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
513 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5[widgets] |
514 |
+ >=dev-qt/qtgui-${QTMIN}:5=[jpeg,libinput] |
515 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
516 |
+ >=dev-qt/qtsql-${QTMIN}:5 |
517 |
+ >=dev-qt/qtsvg-${QTMIN}:5 |
518 |
+ >=dev-qt/qtwayland-${QTMIN}:5= |
519 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
520 |
+ >=dev-qt/qtx11extras-${QTMIN}:5 |
521 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
522 |
+ >=kde-frameworks/kactivities-${KFMIN}:5 |
523 |
+ >=kde-frameworks/kactivities-stats-${KFMIN}:5 |
524 |
+ >=kde-frameworks/karchive-${KFMIN}:5 |
525 |
+ >=kde-frameworks/kauth-${KFMIN}:5 |
526 |
+ >=kde-frameworks/kbookmarks-${KFMIN}:5 |
527 |
+ >=kde-frameworks/kcompletion-${KFMIN}:5 |
528 |
+ >=kde-frameworks/kconfig-${KFMIN}:5 |
529 |
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5 |
530 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
531 |
+ >=kde-frameworks/kcrash-${KFMIN}:5 |
532 |
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5 |
533 |
+ >=kde-frameworks/kdeclarative-${KFMIN}:5 |
534 |
+ >=kde-frameworks/kded-${KFMIN}:5 |
535 |
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5 |
536 |
+ >=kde-frameworks/kguiaddons-${KFMIN}:5 |
537 |
+ >=kde-frameworks/ki18n-${KFMIN}:5 |
538 |
+ >=kde-frameworks/kiconthemes-${KFMIN}:5 |
539 |
+ >=kde-frameworks/kidletime-${KFMIN}:5 |
540 |
+ >=kde-frameworks/kinit-${KFMIN}:5 |
541 |
+ >=kde-frameworks/kio-${KFMIN}:5 |
542 |
+ >=kde-frameworks/kitemmodels-${KFMIN}:5 |
543 |
+ >=kde-frameworks/kitemviews-${KFMIN}:5 |
544 |
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5 |
545 |
+ >=kde-frameworks/knewstuff-${KFMIN}:5 |
546 |
+ >=kde-frameworks/knotifications-${KFMIN}:5 |
547 |
+ >=kde-frameworks/knotifyconfig-${KFMIN}:5 |
548 |
+ >=kde-frameworks/kpackage-${KFMIN}:5 |
549 |
+ >=kde-frameworks/kpeople-${KFMIN}:5 |
550 |
+ >=kde-frameworks/krunner-${KFMIN}:5 |
551 |
+ >=kde-frameworks/kservice-${KFMIN}:5 |
552 |
+ >=kde-frameworks/ktexteditor-${KFMIN}:5 |
553 |
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5 |
554 |
+ >=kde-frameworks/kunitconversion-${KFMIN}:5 |
555 |
+ >=kde-frameworks/kwallet-${KFMIN}:5 |
556 |
+ >=kde-frameworks/kwayland-${KFMIN}:5 |
557 |
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
558 |
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5 |
559 |
+ >=kde-frameworks/kxmlgui-${KFMIN}:5 |
560 |
+ >=kde-frameworks/plasma-${KFMIN}:5 |
561 |
+ >=kde-frameworks/prison-${KFMIN}:5[qml] |
562 |
+ >=kde-frameworks/solid-${KFMIN}:5 |
563 |
+ >=kde-plasma/breeze-${PVCUT}:5 |
564 |
+ >=kde-plasma/kscreenlocker-${PVCUT}:5 |
565 |
+ >=kde-plasma/kwin-${PVCUT}:5 |
566 |
+ >=kde-plasma/layer-shell-qt-${PVCUT}:5 |
567 |
+ >=kde-plasma/libkscreen-${PVCUT}:5 |
568 |
+ >=kde-plasma/libksysguard-${PVCUT}:5 |
569 |
+ >=kde-plasma/libkworkspace-${PVCUT}:5 |
570 |
+ >=media-libs/phonon-4.11.0 |
571 |
+ sci-libs/libqalculate:= |
572 |
+ sys-libs/zlib |
573 |
+ x11-libs/libICE |
574 |
+ x11-libs/libSM |
575 |
+ x11-libs/libX11 |
576 |
+ x11-libs/libXau |
577 |
+ x11-libs/libxcb |
578 |
+ x11-libs/libXcursor |
579 |
+ x11-libs/libXfixes |
580 |
+ x11-libs/libXrender |
581 |
+ x11-libs/libXtst |
582 |
+ x11-libs/xcb-util |
583 |
+ x11-libs/xcb-util-image |
584 |
+ appstream? ( dev-libs/appstream[qt5] ) |
585 |
+ calendar? ( >=kde-frameworks/kholidays-${KFMIN}:5 ) |
586 |
+ fontconfig? ( |
587 |
+ >=dev-qt/qtprintsupport-${QTMIN}:5 |
588 |
+ media-libs/fontconfig |
589 |
+ x11-libs/libXft |
590 |
+ x11-libs/xcb-util-image |
591 |
+ ) |
592 |
+ geolocation? ( >=kde-frameworks/networkmanager-qt-${KFMIN}:5 ) |
593 |
+ gps? ( sci-geosciences/gpsd ) |
594 |
+ policykit? ( virtual/libcrypt:= ) |
595 |
+ screencast? ( |
596 |
+ >=dev-qt/qtgui-${QTMIN}:5=[egl] |
597 |
+ media-libs/libglvnd |
598 |
+ >=media-video/pipewire-0.3:= |
599 |
+ x11-libs/libdrm |
600 |
+ ) |
601 |
+ semantic-desktop? ( >=kde-frameworks/baloo-${KFMIN}:5 ) |
602 |
+ telemetry? ( dev-libs/kuserfeedback:5 ) |
603 |
+" |
604 |
+DEPEND="${COMMON_DEPEND} |
605 |
+ >=dev-libs/plasma-wayland-protocols-1.6.0 |
606 |
+ >=dev-qt/qtconcurrent-${QTMIN}:5 |
607 |
+ >=dev-util/wayland-scanner-1.19.0 |
608 |
+ x11-base/xorg-proto |
609 |
+ fontconfig? ( x11-libs/libXrender ) |
610 |
+ test? ( >=dev-libs/wayland-protocols-1.24 ) |
611 |
+" |
612 |
+RDEPEND="${COMMON_DEPEND} |
613 |
+ app-text/iso-codes |
614 |
+ >=dev-qt/qdbus-${QTMIN}:* |
615 |
+ >=dev-qt/qtgraphicaleffects-${QTMIN}:5 |
616 |
+ >=dev-qt/qtpaths-${QTMIN}:5 |
617 |
+ >=dev-qt/qtquickcontrols-${QTMIN}:5[widgets] |
618 |
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5 |
619 |
+ kde-apps/kio-extras:5 |
620 |
+ >=kde-frameworks/kirigami-${KFMIN}:5 |
621 |
+ >=kde-frameworks/kquickcharts-${KFMIN}:5 |
622 |
+ >=kde-plasma/milou-${PVCUT}:5 |
623 |
+ >=kde-plasma/plasma-integration-${PVCUT}:5 |
624 |
+ sys-apps/dbus |
625 |
+ x11-apps/xmessage |
626 |
+ x11-apps/xprop |
627 |
+ x11-apps/xrdb |
628 |
+ x11-apps/xsetroot |
629 |
+ !<kde-plasma/breeze-5.22.90:5 |
630 |
+ !<kde-plasma/plasma-desktop-5.23.90:5 |
631 |
+ policykit? ( sys-apps/accountsservice ) |
632 |
+" |
633 |
+BDEPEND=" |
634 |
+ >=dev-qt/qtwaylandscanner-${QTMIN}:5 |
635 |
+ virtual/pkgconfig |
636 |
+" |
637 |
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5" |
638 |
+ |
639 |
+PATCHES=( |
640 |
+ "${FILESDIR}/${PN}-5.24.80-split-libkworkspace.patch" # downstream |
641 |
+ "${FILESDIR}/${PN}-5.22.5-krunner-cwd-at-home.patch" # TODO upstream: KDE-bug 432975, bug 767478 |
642 |
+ "${FILESDIR}/${P}-widgetexplorer-recurse-containments.patch" # https://mail.kde.org/pipermail/distributions/2022-September/001287.html |
643 |
+ "${FILESDIR}/${P}-delay-ksplash-until-after-env-setup.patch" # KDE-bug 458865 w/ Qt 5.15.6 |
644 |
+ "${FILESDIR}/${P}-fonts-honor-and-present-system-defaults.patch" # KDE-bug 416140 |
645 |
+ "${FILESDIR}/${P}-prevent-panel-go-out-of-screen.patch" # git master and Plasma/5.24 branch double revert |
646 |
+ "${FILESDIR}/${P}-fix-setpassword.patch" # Plasma/5.25 branch, KDE-bug 459309 |
647 |
+ "${FILESDIR}/${P}-systray-double-destroy.patch" # Plasma/5.24 branch, KDE-bug 420245 |
648 |
+ "${FILESDIR}/${P}-geolocation-deadlock.patch" # Plasma/5.24 branch, KDE-bug 449984, KDE-bug 457341 |
649 |
+ "${FILESDIR}/${P}-lock-layout.patch" # Plasma/5.24 branch, KDE-bug 413645 |
650 |
+ "${FILESDIR}/${P}-relayout.patch" # Plasma/5.24 branch |
651 |
+ "${FILESDIR}/${P}-layout-save.patch" # Plasma/5.24 branch |
652 |
+) |
653 |
+ |
654 |
+src_prepare() { |
655 |
+ ecm_src_prepare |
656 |
+ |
657 |
+ cmake_comment_add_subdirectory libkworkspace |
658 |
+ # delete colliding libkworkspace translations |
659 |
+ if [[ ${KDE_BUILD_TYPE} = release ]]; then |
660 |
+ find po -type f -name "*po" -and -name "libkworkspace*" -delete || die |
661 |
+ fi |
662 |
+ |
663 |
+ # TODO: try to get a build switch upstreamed |
664 |
+ if ! use screencast; then |
665 |
+ sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die |
666 |
+ fi |
667 |
+ |
668 |
+ # TODO: try to get a build switch upstreamed |
669 |
+ if use geolocation; then |
670 |
+ use gps || sed -e "s/^pkg_check_modules.*LIBGPS/#&/" \ |
671 |
+ -i dataengines/geolocation/CMakeLists.txt || die |
672 |
+ fi |
673 |
+ |
674 |
+ if ! use policykit; then |
675 |
+ cmake_run_in kcms cmake_comment_add_subdirectory users |
676 |
+ fi |
677 |
+} |
678 |
+ |
679 |
+src_configure() { |
680 |
+ local mycmakeargs=( |
681 |
+ -DBUILD_xembed-sni-proxy=OFF |
682 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON |
683 |
+ $(cmake_use_find_package appstream AppStreamQt) |
684 |
+ $(cmake_use_find_package calendar KF5Holidays) |
685 |
+ $(cmake_use_find_package fontconfig Fontconfig) |
686 |
+ $(cmake_use_find_package geolocation KF5NetworkManagerQt) |
687 |
+ $(cmake_use_find_package semantic-desktop KF5Baloo) |
688 |
+ $(cmake_use_find_package telemetry KUserFeedback) |
689 |
+ ) |
690 |
+ |
691 |
+ ecm_src_configure |
692 |
+} |
693 |
+ |
694 |
+src_install() { |
695 |
+ ecm_src_install |
696 |
+ |
697 |
+ # default startup and shutdown scripts |
698 |
+ insinto /etc/xdg/plasma-workspace/env |
699 |
+ doins "${FILESDIR}"/10-agent-startup.sh |
700 |
+ |
701 |
+ insinto /etc/xdg/plasma-workspace/shutdown |
702 |
+ doins "${FILESDIR}"/10-agent-shutdown.sh |
703 |
+ fperms +x /etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh |
704 |
+} |
705 |
+ |
706 |
+pkg_postinst () { |
707 |
+ ecm_pkg_postinst |
708 |
+ |
709 |
+ elog "To enable gpg-agent and/or ssh-agent in Plasma sessions," |
710 |
+ elog "edit ${EPREFIX}/etc/xdg/plasma-workspace/env/10-agent-startup.sh" |
711 |
+ elog "and ${EPREFIX}/etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh" |
712 |
+} |