summaryrefslogtreecommitdiff
path: root/kde-plasma/plasma-workspace/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-30 07:22:57 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-30 07:22:57 +0000
commit3059f20995d5ac642b7b4a38d538fdf1cc45d90d (patch)
tree8d4c6b1c09f03338eef1359de3dfeec28ea11644 /kde-plasma/plasma-workspace/files
parentf616ce4660c92a3fcb4f05663c2ab47c9defa0c3 (diff)
gentoo auto-resync : 30:11:2022 - 07:22:56
Diffstat (limited to 'kde-plasma/plasma-workspace/files')
-rw-r--r--kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-geolocation-deadlock.patch194
-rw-r--r--kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-layout-save.patch33
-rw-r--r--kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-lock-layout.patch113
-rw-r--r--kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-prevent-panel-go-out-of-screen.patch8
-rw-r--r--kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-relayout.patch22
-rw-r--r--kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-systray-double-destroy.patch24
6 files changed, 386 insertions, 8 deletions
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
new file mode 100644
index 000000000000..70bd28419472
--- /dev/null
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-geolocation-deadlock.patch
@@ -0,0 +1,194 @@
+https://invent.kde.org/plasma/plasma-workspace/-/commit/d693026676cc6bf2b7c23e9ff4b620679cf15d10
+
+From d693026676cc6bf2b7c23e9ff4b620679cf15d10 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Mon, 15 Aug 2022 18:36:56 +0200
+Subject: [PATCH] [dataengines/geolocation] Port from KIO::http_post to
+ QNetworkAccessManager
+
+Not only does this slightly simplify the code, it also avoids a deadlock in kded when automatic proxy detection is enabled
+
+BUG: 449984
+
+BUG: 457341
+(cherry picked from commit 98cadd48c21c89b81fdeb3499a557a6551a09d8a)
+---
+ dataengines/geolocation/CMakeLists.txt | 2 +-
+ dataengines/geolocation/location_ip.cpp | 84 ++++++++++---------------
+ 2 files changed, 35 insertions(+), 51 deletions(-)
+
+diff --git a/dataengines/geolocation/CMakeLists.txt b/dataengines/geolocation/CMakeLists.txt
+index 175687bd4d..6ae707643c 100644
+--- a/dataengines/geolocation/CMakeLists.txt
++++ b/dataengines/geolocation/CMakeLists.txt
+@@ -36,7 +36,7 @@ target_link_libraries(plasma_engine_geolocation
+ kcoreaddons_add_plugin(plasma-geolocation-ip SOURCES location_ip.cpp INSTALL_NAMESPACE plasma/geolocationprovider)
+ ecm_qt_declare_logging_category(plasma-geolocation-ip HEADER geolocdebug.h IDENTIFIER DATAENGINE_GEOLOCATION CATEGORY_NAME org.kde.plasma.dataengine.geolocation)
+ target_compile_definitions(plasma-geolocation-ip PRIVATE -DQT_NO_KEYWORDS)
+-target_link_libraries(plasma-geolocation-ip plasma-geolocation-interface KF5::KIOCore KF5::NetworkManagerQt)
++target_link_libraries(plasma-geolocation-ip plasma-geolocation-interface KF5::NetworkManagerQt)
+
+ pkg_check_modules(LIBGPS libgps IMPORTED_TARGET)
+
+diff --git a/dataengines/geolocation/location_ip.cpp b/dataengines/geolocation/location_ip.cpp
+index 27b530810c..3c5a202b89 100644
+--- a/dataengines/geolocation/location_ip.cpp
++++ b/dataengines/geolocation/location_ip.cpp
+@@ -12,15 +12,14 @@
+
+ #include "location_ip.h"
+ #include "geolocdebug.h"
+-#include <KIO/Job>
+-#include <KIO/TransferJob>
+-#include <KJob>
+ #include <KSharedConfig>
+ #include <NetworkManagerQt/Manager>
+ #include <NetworkManagerQt/WirelessDevice>
+ #include <QJsonArray>
+ #include <QJsonDocument>
+ #include <QJsonObject>
++#include <QNetworkAccessManager>
++#include <QNetworkReply>
+ #include <QUrl>
+
+ class Ip::Private : public QObject
+@@ -30,19 +29,21 @@ public:
+ Private(Ip *q)
+ : q(q)
+ {
++ m_nam.setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
++ m_nam.setStrictTransportSecurityEnabled(true);
++ m_nam.enableStrictTransportSecurityStore(true,
++ QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/plasmashell/hsts/"));
+ }
+
+- void readGeoLocation(KJob *job)
++ void readGeoLocation(QNetworkReply *reply)
+ {
+ m_geoLocationResolved = true;
+- if (job && job->error()) {
+- qCCritical(DATAENGINE_GEOLOCATION) << "error: " << job->errorString();
+- m_geoLocationPayload.clear();
++ if (reply->error()) {
++ qCCritical(DATAENGINE_GEOLOCATION) << "error: " << reply->errorString();
+ checkUpdateData();
+ return;
+ }
+- const QJsonObject json = QJsonDocument::fromJson(m_geoLocationPayload).object();
+- m_geoLocationPayload.clear();
++ const QJsonObject json = QJsonDocument::fromJson(reply->readAll()).object();
+
+ auto accuracyIt = json.find(QStringLiteral("accuracy"));
+ if (accuracyIt != json.end()) {
+@@ -62,52 +63,28 @@ public:
+
+ void clear()
+ {
+- m_geoLocationPayload.clear();
+- m_countryPayload.clear();
+ m_countryResolved = false;
+ m_geoLocationResolved = false;
+ m_data.clear();
+ }
+
+- void geoLocationData(KIO::Job *job, const QByteArray &data)
+- {
+- Q_UNUSED(job)
+-
+- if (data.isEmpty()) {
+- return;
+- }
+- m_geoLocationPayload.append(data);
+- }
+-
+- void countryData(KIO::Job *job, const QByteArray &data)
+- {
+- Q_UNUSED(job)
+-
+- if (data.isEmpty()) {
+- return;
+- }
+- m_countryPayload.append(data);
+- }
+-
+- void readCountry(KJob *job)
++ void readCountry(QNetworkReply *reply)
+ {
+ m_countryResolved = true;
+- if (job && job->error()) {
+- qCCritical(DATAENGINE_GEOLOCATION) << "error: " << job->errorString();
+- m_countryPayload.clear();
++ if (reply->error()) {
++ qCCritical(DATAENGINE_GEOLOCATION) << "error: " << reply->errorString();
+ checkUpdateData();
+ return;
+ }
+
+- const QJsonObject json = QJsonDocument::fromJson(m_countryPayload).object();
+- m_countryPayload.clear();
++ const QJsonObject json = QJsonDocument::fromJson(reply->readAll()).object();
+
+ m_data[QStringLiteral("country")] = json.value(QStringLiteral("country_name")).toString();
+ m_data[QStringLiteral("country code")] = json.value(QStringLiteral("country_code")).toString();
++
+ checkUpdateData();
+ }
+
+-private:
+ void checkUpdateData()
+ {
+ if (!m_countryResolved || !m_geoLocationResolved) {
+@@ -117,11 +94,10 @@ private:
+ }
+
+ Ip *q;
+- QByteArray m_geoLocationPayload;
+- QByteArray m_countryPayload;
+ bool m_countryResolved = false;
+ bool m_geoLocationResolved = false;
+ Plasma::DataEngine::Data m_data;
++ QNetworkAccessManager m_nam;
+ };
+
+ Ip::Ip(QObject *parent, const QVariantList &args)
+@@ -176,18 +152,26 @@ void Ip::update()
+ }
+ const QByteArray postData = QJsonDocument(request).toJson(QJsonDocument::Compact);
+ const QString apiKey = QStringLiteral("60e8eae6-3988-4ada-ad48-2cfddddf216b");
+- KIO::TransferJob *datajob =
+- KIO::http_post(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/geolocate?key=%1").arg(apiKey)), postData, KIO::HideProgressInfo);
+- datajob->addMetaData(QStringLiteral("content-type"), QStringLiteral("application/json"));
+
+ qCDebug(DATAENGINE_GEOLOCATION) << "Fetching https://location.services.mozilla.com/v1/geolocate";
+- connect(datajob, &KIO::TransferJob::data, d, &Ip::Private::geoLocationData);
+- connect(datajob, &KIO::TransferJob::result, d, &Ip::Private::readGeoLocation);
+-
+- datajob = KIO::http_post(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/country?key=%1").arg(apiKey)), postData, KIO::HideProgressInfo);
+- datajob->addMetaData(QStringLiteral("content-type"), QStringLiteral("application/json"));
+- connect(datajob, &KIO::TransferJob::data, d, &Ip::Private::countryData);
+- connect(datajob, &KIO::TransferJob::result, d, &Ip::Private::readCountry);
++ QNetworkRequest locationRequest(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/geolocate?key=%1").arg(apiKey)));
++ locationRequest.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/json"));
++ QNetworkReply *locationReply = d->m_nam.post(locationRequest, postData);
++
++ connect(locationReply, &QNetworkReply::finished, this, [this, locationReply] {
++ locationReply->deleteLater();
++ d->readGeoLocation(locationReply);
++ });
++
++ qCDebug(DATAENGINE_GEOLOCATION) << "Fetching https://location.services.mozilla.com/v1/country";
++ QNetworkRequest countryRequest(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/country?key=%1").arg(apiKey)));
++ countryRequest.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/json"));
++ QNetworkReply *countryReply = d->m_nam.post(countryRequest, postData);
++
++ connect(countryReply, &QNetworkReply::finished, this, [this, countryReply] {
++ countryReply->deleteLater();
++ d->readCountry(countryReply);
++ });
+ }
+
+ K_PLUGIN_CLASS_WITH_JSON(Ip, "plasma-geolocation-ip.json")
+--
+GitLab
+
+
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
new file mode 100644
index 000000000000..ed298549128a
--- /dev/null
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-layout-save.patch
@@ -0,0 +1,33 @@
+https://invent.kde.org/plasma/plasma-workspace/-/commit/b983f1c758552346083ffe0b3d47173b487ae426
+
+From b983f1c758552346083ffe0b3d47173b487ae426 Mon Sep 17 00:00:00 2001
+From: Aaron Rainbolt <arraybolt3@gmail.com>
+Date: Wed, 19 Oct 2022 14:16:26 -0500
+Subject: [PATCH] Save layout immediately after a resolution change triggered
+ relayout
+
+(cherry picked from commit f33cd92fbfb765299018bddc2a86ac5326731231)
+---
+ components/containmentlayoutmanager/appletslayout.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/components/containmentlayoutmanager/appletslayout.cpp b/components/containmentlayoutmanager/appletslayout.cpp
+index 70970e8919..c3e957cbd9 100644
+--- a/components/containmentlayoutmanager/appletslayout.cpp
++++ b/components/containmentlayoutmanager/appletslayout.cpp
+@@ -80,6 +80,11 @@ AppletsLayout::AppletsLayout(QQuickItem *parent)
+ } else if (!m_geometryBeforeResolutionChange.isEmpty()) {
+ m_layoutManager->layoutGeometryChanged(newGeom, m_geometryBeforeResolutionChange);
+ m_geometryBeforeResolutionChange = QRectF();
++
++ // 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
++ // places on next login, so save them now.
++
++ save();
+ }
+ }
+ m_layoutChanges = NoChange;
+--
+GitLab
+
+
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
new file mode 100644
index 000000000000..422b22a678dd
--- /dev/null
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-lock-layout.patch
@@ -0,0 +1,113 @@
+https://invent.kde.org/plasma/plasma-workspace/-/commit/0a01c8910309fb9f289fe0aa58492e106d154548
+
+From 0a01c8910309fb9f289fe0aa58492e106d154548 Mon Sep 17 00:00:00 2001
+From: Marco Martin <notmart@gmail.com>
+Date: Sun, 25 Sep 2022 16:47:31 -0500
+Subject: [PATCH] Introduce a lock that blocks relayouts and config writes
+
+The resize of the layout area can happen either by screen resolution
+change or available screen area change (a panel appears or is resized)
+This is not an atomic operation, as width and height are usually set in
+2 different operations, and even worse the layout area is resized to
+ match the available one with an animation, so many intermediate resizes
+that should never cause a relayout happen.
+In normal operation an event compression timer limits the actual
+relayouts to hopefully one, but if the system is really slowed down
+(for instance, startup) the timer may expire and cause relayouts in
+non useful sizes, losing the needed configuration
+In combination with
+
+The lock blocks all relayout and config writes when the size of the
+layout area doesn't correspond to corona availablescreenrect, which are
+the only "settled" cases.
+
+BUG:413645
+--- a/components/containmentlayoutmanager/appletslayout.cpp
++++ b/components/containmentlayoutmanager/appletslayout.cpp
+@@ -56,9 +56,10 @@ AppletsLayout::AppletsLayout(QQuickItem *parent)
+ connect(m_layoutChangeTimer, &QTimer::timeout, this, [this]() {
+ // We can't assume m_containment to be valid: if we load in a plasmoid that can run also
+ // in "applet" mode, m_containment will never be valid
+- if (!m_containment) {
++ if (!m_containment || width() <= 0 || height() <= 0 || m_relayoutLock) {
+ return;
+ }
++
+ const QString &serializedConfig = m_containment->config().readEntry(m_configKey, "");
+ if ((m_layoutChanges & ConfigKeyChange) && !serializedConfig.isEmpty()) {
+ if (!m_configKey.isEmpty() && m_containment) {
+@@ -169,6 +170,27 @@ void AppletsLayout::setFallbackConfigKey(const QString &key)
+ Q_EMIT fallbackConfigKeyChanged();
+ }
+
++bool AppletsLayout::relayoutLock() const
++{
++ return m_relayoutLock;
++}
++
++void AppletsLayout::setRelayoutLock(bool lock)
++{
++ if (lock == m_relayoutLock) {
++ return;
++ }
++
++ m_relayoutLock = lock;
++
++ if (!lock && m_layoutChanges != NoChange) {
++ m_layoutChangeTimer->start();
++ }
++
++ Q_EMIT relayoutLockChanged();
++}
++
++
+ QJSValue AppletsLayout::acceptsAppletCallback() const
+ {
+ return m_acceptsAppletCallback;
+@@ -468,7 +490,7 @@ void AppletsLayout::geometryChanged(const QRectF &newGeometry, const QRectF &old
+ }
+
+ // Only do a layouting procedure if we received a valid size
+- if (!newGeometry.isEmpty()) {
++ if (!newGeometry.isEmpty() && newGeometry != oldGeometry) {
+ m_layoutChanges |= SizeChange;
+ m_layoutChangeTimer->start();
+ }
+--- a/components/containmentlayoutmanager/appletslayout.h
++++ b/components/containmentlayoutmanager/appletslayout.h
+@@ -39,6 +39,8 @@ class AppletsLayout : public QQuickItem
+ // from the screen size and plasma starts on an "unexpected" size
+ Q_PROPERTY(QString fallbackConfigKey READ fallbackConfigKey WRITE setFallbackConfigKey NOTIFY fallbackConfigKeyChanged)
+
++ Q_PROPERTY(bool relayoutLock READ relayoutLock WRITE setRelayoutLock NOTIFY relayoutLockChanged)
++
+ Q_PROPERTY(PlasmaQuick::AppletQuickItem *containment READ containment WRITE setContainment NOTIFY containmentChanged)
+
+ Q_PROPERTY(QJSValue acceptsAppletCallback READ acceptsAppletCallback WRITE setAcceptsAppletCallback NOTIFY acceptsAppletCallbackChanged)
+@@ -103,6 +105,9 @@ public:
+ QString fallbackConfigKey() const;
+ void setFallbackConfigKey(const QString &key);
+
++ bool relayoutLock() const;
++ void setRelayoutLock(bool lock);
++
+ PlasmaQuick::AppletQuickItem *containment() const;
+ void setContainment(PlasmaQuick::AppletQuickItem *containment);
+
+@@ -162,6 +167,7 @@ Q_SIGNALS:
+
+ void configKeyChanged();
+ void fallbackConfigKeyChanged();
++ void relayoutLockChanged();
+ void containmentChanged();
+ void minimumItemWidthChanged();
+ void minimumItemHeightChanged();
+@@ -226,6 +232,7 @@ private:
+ QPointF m_mouseDownPosition = QPoint(-1, -1);
+ bool m_mouseDownWasEditMode = false;
+ bool m_editMode = false;
++ bool m_relayoutLock = false;
+ };
+
+ Q_DECLARE_OPERATORS_FOR_FLAGS(AppletsLayout::LayoutChanges)
+GitLab
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
index 457470f0807c..ef94ed3afa00 100644
--- 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
@@ -10,12 +10,6 @@ There is still a known culprit (duplicate display names) so the hack shouldn't b
CCBUG: 353975
CCBUG: 438114
----
- shell/panelview.cpp | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/shell/panelview.cpp b/shell/panelview.cpp
-index b5c87bbf71..4be1e26ca4 100644
--- a/shell/panelview.cpp
+++ b/shell/panelview.cpp
@@ -859,6 +859,9 @@ void PanelView::moveEvent(QMoveEvent *ev)
@@ -28,6 +22,4 @@ index b5c87bbf71..4be1e26ca4 100644
}
void PanelView::keyPressEvent(QKeyEvent *event)
---
GitLab
-
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
new file mode 100644
index 000000000000..efd211c26de4
--- /dev/null
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-relayout.patch
@@ -0,0 +1,22 @@
+https://invent.kde.org/plasma/plasma-workspace/-/commit/f30431c9ed0bb70506cbc72ea337323660a0dc14
+
+From f30431c9ed0bb70506cbc72ea337323660a0dc14 Mon Sep 17 00:00:00 2001
+From: Aaron Rainbolt <arraybolt3@gmail.com>
+Date: Wed, 19 Oct 2022 14:15:16 -0500
+Subject: [PATCH] Remove unnecessary heuristic relayout function call
+
+(cherry picked from commit c344410a061862dd4802581a1ac3b9a09758ace0)
+--- a/components/containmentlayoutmanager/appletslayout.cpp
++++ b/components/containmentlayoutmanager/appletslayout.cpp
+@@ -80,10 +80,6 @@ AppletsLayout::AppletsLayout(QQuickItem *parent)
+ } else if (!m_geometryBeforeResolutionChange.isEmpty()) {
+ m_layoutManager->layoutGeometryChanged(newGeom, m_geometryBeforeResolutionChange);
+ m_geometryBeforeResolutionChange = QRectF();
+-
+- // Heuristically relayout items only when the plasma startup is fully completed
+- } else {
+- polish();
+ }
+ }
+ m_layoutChanges = NoChange;
+GitLab
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
new file mode 100644
index 000000000000..3719f2dcae7a
--- /dev/null
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.25.5-systray-double-destroy.patch
@@ -0,0 +1,24 @@
+https://invent.kde.org/plasma/plasma-workspace/-/commit/432d7c4b51c5a1f17af327d770266b3fe81e5ae5
+
+From 432d7c4b51c5a1f17af327d770266b3fe81e5ae5 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Tue, 27 Sep 2022 18:04:51 +0200
+Subject: [PATCH] [applets/systemtray] Don't manually destroy innerContainment
+
+It's already destroyed by the corona
+
+BUG: 420245
+(cherry picked from commit 7baa4c221e45f161adf4e00d4cf0e36d6436e90c)
+--- a/applets/systemtray/container/systemtraycontainer.cpp
++++ b/applets/systemtray/container/systemtraycontainer.cpp
+@@ -20,9 +20,6 @@ SystemTrayContainer::SystemTrayContainer(QObject *parent, const KPluginMetaData
+
+ SystemTrayContainer::~SystemTrayContainer()
+ {
+- if (destroyed()) {
+- m_innerContainment->destroy();
+- }
+ }
+
+ void SystemTrayContainer::init()
+GitLab