From f445891c25ef96a3f3d4617295eccf8913de50a6 Mon Sep 17 00:00:00 2001 From: Toast Date: Sat, 18 Oct 2025 00:51:17 +0200 Subject: [PATCH] Kde/patches: delete merged patches --- roles/kde/patches/kwindowsystem/1-pr187.patch | 78 ---- roles/kde/patches/kwindowsystem/patches.txt | 4 - roles/kde/patches/kwindowsystem/pr186.patch | 415 ------------------ 3 files changed, 497 deletions(-) delete mode 100644 roles/kde/patches/kwindowsystem/1-pr187.patch delete mode 100644 roles/kde/patches/kwindowsystem/patches.txt delete mode 100644 roles/kde/patches/kwindowsystem/pr186.patch diff --git a/roles/kde/patches/kwindowsystem/1-pr187.patch b/roles/kde/patches/kwindowsystem/1-pr187.patch deleted file mode 100644 index 9021735..0000000 --- a/roles/kde/patches/kwindowsystem/1-pr187.patch +++ /dev/null @@ -1,78 +0,0 @@ -From b05d0431d741510c12294c85dc5ce001a8aceca2 Mon Sep 17 00:00:00 2001 -From: Vlad Zahorodnii -Date: Wed, 17 Sep 2025 11:41:15 +0300 -Subject: [PATCH 1/2] wayland: Fix leaking xdg activation objects - -Nobody destroys WaylandXdgActivationV1 objects, we also must call destroy() -manually. ---- - src/platforms/wayland/waylandxdgactivationv1_p.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/platforms/wayland/waylandxdgactivationv1_p.h b/src/platforms/wayland/waylandxdgactivationv1_p.h -index e74c550b..e3b14c27 100644 ---- a/src/platforms/wayland/waylandxdgactivationv1_p.h -+++ b/src/platforms/wayland/waylandxdgactivationv1_p.h -@@ -16,10 +16,18 @@ class QWaylandSurface; - class WaylandXdgActivationTokenV1 : public QObject, public QtWayland::xdg_activation_token_v1 - { - Q_OBJECT -+ - public: -+ ~WaylandXdgActivationTokenV1() override -+ { -+ destroy(); -+ } -+ -+protected: - void xdg_activation_token_v1_done(const QString &token) override - { - Q_EMIT done(token); -+ deleteLater(); - } - - Q_SIGNALS: --- -GitLab - - -From ac28bf993ba7295faf39607d4b4402f6dce1c36b Mon Sep 17 00:00:00 2001 -From: Vlad Zahorodnii -Date: Wed, 17 Sep 2025 11:43:16 +0300 -Subject: [PATCH 2/2] wayland: Drop WaylandXdgActivationTokenV1::failed signal - -It's not emitted by anyone. ---- - src/platforms/wayland/waylandxdgactivationv1_p.h | 1 - - src/platforms/wayland/windowsystem.cpp | 3 --- - 2 files changed, 4 deletions(-) - -diff --git a/src/platforms/wayland/waylandxdgactivationv1_p.h b/src/platforms/wayland/waylandxdgactivationv1_p.h -index e3b14c27..077ccd93 100644 ---- a/src/platforms/wayland/waylandxdgactivationv1_p.h -+++ b/src/platforms/wayland/waylandxdgactivationv1_p.h -@@ -31,7 +31,6 @@ protected: - } - - Q_SIGNALS: -- void failed(); - void done(const QString &token); - }; - -diff --git a/src/platforms/wayland/windowsystem.cpp b/src/platforms/wayland/windowsystem.cpp -index 034ffd37..f2d8b4f2 100644 ---- a/src/platforms/wayland/windowsystem.cpp -+++ b/src/platforms/wayland/windowsystem.cpp -@@ -95,9 +95,6 @@ void WindowSystem::requestToken(QWindow *window, uint32_t serial, const QString - auto waylandApp = qGuiApp->nativeInterface(); - auto seat = waylandApp ? waylandApp->lastInputSeat() : nullptr; - auto tokenReq = activation->requestXdgActivationToken(seat, wlSurface, serial, app_id); -- connect(tokenReq, &WaylandXdgActivationTokenV1::failed, KWindowSystem::self(), [serial, app_id]() { -- Q_EMIT KWaylandExtras::self()->xdgActivationTokenArrived(serial, {}); -- }); - connect(tokenReq, &WaylandXdgActivationTokenV1::done, KWindowSystem::self(), [serial](const QString &token) { - Q_EMIT KWaylandExtras::self()->xdgActivationTokenArrived(serial, token); - }); --- -GitLab - diff --git a/roles/kde/patches/kwindowsystem/patches.txt b/roles/kde/patches/kwindowsystem/patches.txt deleted file mode 100644 index f7b32a9..0000000 --- a/roles/kde/patches/kwindowsystem/patches.txt +++ /dev/null @@ -1,4 +0,0 @@ -Plasma 6.6.0: - -Pr 186 https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/186 -Pr 187 https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/187 diff --git a/roles/kde/patches/kwindowsystem/pr186.patch b/roles/kde/patches/kwindowsystem/pr186.patch deleted file mode 100644 index c77e64f..0000000 --- a/roles/kde/patches/kwindowsystem/pr186.patch +++ /dev/null @@ -1,415 +0,0 @@ -From 9d0ffb13d290d76df03d199b50c3b3364d4b93bc Mon Sep 17 00:00:00 2001 -From: Vlad Zahorodnii -Date: Wed, 17 Sep 2025 10:14:15 +0300 -Subject: [PATCH 1/2] Add QFuture-based xdg-activation token helpers - -QFuture can be used to make the code that needs activation tokens cleaner. ---- - src/kwaylandextras.cpp | 14 +++++++++++ - src/kwaylandextras.h | 21 ++++++++++++++++ - src/kwindowsystem_p.h | 8 ++++++ - .../wayland/waylandxdgactivationv1_p.h | 19 ++++++++++++++ - src/platforms/wayland/windowsystem.cpp | 25 ++++++++++++++++--- - src/platforms/wayland/windowsystem.h | 3 ++- - tests/activationtest.cpp | 13 +++++----- - tests/kwaylandextrastest.cpp | 12 +++------ - 8 files changed, 95 insertions(+), 20 deletions(-) - -diff --git a/src/kwaylandextras.cpp b/src/kwaylandextras.cpp -index 036d57d3..a5f8af8f 100644 ---- a/src/kwaylandextras.cpp -+++ b/src/kwaylandextras.cpp -@@ -63,4 +63,18 @@ void KWaylandExtras::unexportWindow(QWindow *window) - } - } - -+QFuture KWaylandExtras::xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId) -+{ -+ if (auto dv3 = dynamic_cast(KWindowSystem::d_func())) { -+ return dv3->xdgActivationToken(window, serial, appId); -+ } else { -+ return QFuture(); -+ } -+} -+ -+QFuture KWaylandExtras::xdgActivationToken(QWindow *window, const QString &appId) -+{ -+ return xdgActivationToken(window, lastInputSerial(window), appId); -+} -+ - #include "moc_kwaylandextras.cpp" -diff --git a/src/kwaylandextras.h b/src/kwaylandextras.h -index f43135d0..2f763dd5 100644 ---- a/src/kwaylandextras.h -+++ b/src/kwaylandextras.h -@@ -9,6 +9,7 @@ - #ifndef KWAYLANDEXTRAS_H - #define KWAYLANDEXTRAS_H - -+#include - #include - #include - -@@ -61,6 +62,26 @@ public: - */ - Q_INVOKABLE static void unexportWindow(QWindow *window); - -+ /*! -+ * Requests an xdg_activation_v1 token for a specific window \a window with the given \a appId. -+ * The \a serial indicates an event that triggered the request. -+ * -+ * \note No xdgActivationTokenArrived() signal will be emitted for this token. -+ * -+ * \since 6.19 -+ */ -+ static QFuture xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId); -+ -+ /*! -+ * Requests an xdg_activation_v1 token for a specific window \a window with the given \a appId. -+ * The last received input serial will be used to request the token. -+ * -+ * \note No xdgActivationTokenArrived() signal will be emitted for this token. -+ * -+ * \since 6.19 -+ */ -+ static QFuture xdgActivationToken(QWindow *window, const QString &appId); -+ - Q_SIGNALS: - /*! - * Activation \a token to pass to the client. -diff --git a/src/kwindowsystem_p.h b/src/kwindowsystem_p.h -index eb9348ba..e4b51e3e 100644 ---- a/src/kwindowsystem_p.h -+++ b/src/kwindowsystem_p.h -@@ -7,6 +7,8 @@ - #define KWINDOWSYSTEM_P_H - - #include "netwm_def.h" -+ -+#include - #include - #include //For WId - #include -@@ -33,4 +35,10 @@ public: - virtual void unexportWindow(QWindow *window) = 0; - }; - -+class KWINDOWSYSTEM_EXPORT KWindowSystemPrivateV3 : public KWindowSystemPrivateV2 -+{ -+public: -+ virtual QFuture xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId) = 0; -+}; -+ - #endif -diff --git a/src/platforms/wayland/waylandxdgactivationv1_p.h b/src/platforms/wayland/waylandxdgactivationv1_p.h -index 077ccd93..629d45ef 100644 ---- a/src/platforms/wayland/waylandxdgactivationv1_p.h -+++ b/src/platforms/wayland/waylandxdgactivationv1_p.h -@@ -8,7 +8,10 @@ - #define WAYLANDXDGACTIVATIONV1_P_H - - #include "qwayland-xdg-activation-v1.h" -+ -+#include - #include -+#include - #include - - class QWaylandSurface; -@@ -18,20 +21,36 @@ class WaylandXdgActivationTokenV1 : public QObject, public QtWayland::xdg_activa - Q_OBJECT - - public: -+ WaylandXdgActivationTokenV1() -+ { -+ m_promise.start(); -+ } -+ - ~WaylandXdgActivationTokenV1() override - { - destroy(); - } - -+ QFuture future() const -+ { -+ return m_promise.future(); -+ } -+ - protected: - void xdg_activation_token_v1_done(const QString &token) override - { -+ m_promise.addResult(token); -+ m_promise.finish(); -+ - Q_EMIT done(token); - deleteLater(); - } - - Q_SIGNALS: - void done(const QString &token); -+ -+private: -+ QPromise m_promise; - }; - - class WaylandXdgActivationV1 : public QWaylandClientExtensionTemplate, public QtWayland::xdg_activation_v1 -diff --git a/src/platforms/wayland/windowsystem.cpp b/src/platforms/wayland/windowsystem.cpp -index f2d8b4f2..ebb22d78 100644 ---- a/src/platforms/wayland/windowsystem.cpp -+++ b/src/platforms/wayland/windowsystem.cpp -@@ -50,9 +50,7 @@ public: - }; - - WindowSystem::WindowSystem() -- : QObject() -- , KWindowSystemPrivateV2() -- , m_lastToken(qEnvironmentVariable("XDG_ACTIVATION_TOKEN")) -+ : m_lastToken(qEnvironmentVariable("XDG_ACTIVATION_TOKEN")) - { - m_windowManagement = new WindowManagement; - } -@@ -303,4 +301,25 @@ void WindowSystem::doSetMainWindow(QWindow *window, const QString &handle) - } - } - -+QFuture WindowSystem::xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId) -+{ -+ WaylandXdgActivationV1 *activation = WaylandXdgActivationV1::self(); -+ if (!activation->isActive()) { -+ return QFuture(); -+ } -+ -+ auto waylandApp = qGuiApp->nativeInterface(); -+ if (!waylandApp) { -+ return QFuture(); -+ } -+ -+ if (window) { -+ window->create(); -+ } -+ wl_surface *wlSurface = surfaceForWindow(window); -+ -+ auto token = activation->requestXdgActivationToken(waylandApp->lastInputSeat(), wlSurface, serial, appId); -+ return token->future(); -+} -+ - #include "moc_windowsystem.cpp" -diff --git a/src/platforms/wayland/windowsystem.h b/src/platforms/wayland/windowsystem.h -index 87bf23ed..4df82388 100644 ---- a/src/platforms/wayland/windowsystem.h -+++ b/src/platforms/wayland/windowsystem.h -@@ -12,7 +12,7 @@ - - class WindowManagement; - --class WindowSystem : public QObject, public KWindowSystemPrivateV2 -+class WindowSystem : public QObject, public KWindowSystemPrivateV3 - { - Q_OBJECT - public: -@@ -27,6 +27,7 @@ public: - void exportWindow(QWindow *window) override; - void unexportWindow(QWindow *window) override; - void setMainWindow(QWindow *window, const QString &handle) override; -+ QFuture xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId) override; - - protected: - bool eventFilter(QObject *watched, QEvent *event) override; -diff --git a/tests/activationtest.cpp b/tests/activationtest.cpp -index 306c6048..7aaae4ea 100644 ---- a/tests/activationtest.cpp -+++ b/tests/activationtest.cpp -@@ -28,13 +28,12 @@ public: - pushButton->setText("Raise other"); - layout()->addWidget(pushButton); - -- connect(pushButton, &QPushButton::clicked, this, [this] { -- KWaylandExtras::requestXdgActivationToken(windowHandle(), KWaylandExtras::lastInputSerial(windowHandle()), QString()); -- }); -- -- connect(KWaylandExtras::self(), &KWaylandExtras::xdgActivationTokenArrived, this, [otherWindow](int /*serial*/, const QString &token) { -- KWindowSystem::setCurrentXdgActivationToken(token); -- KWindowSystem::activateWindow(otherWindow->windowHandle()); -+ connect(pushButton, &QPushButton::clicked, this, [this, otherWindow] { -+ KWaylandExtras::xdgActivationToken(windowHandle(), KWaylandExtras::lastInputSerial(windowHandle()), QString()) -+ .then(otherWindow, [otherWindow](const QString &token) { -+ KWindowSystem::setCurrentXdgActivationToken(token); -+ KWindowSystem::activateWindow(otherWindow->windowHandle()); -+ }); - }); - } - }; -diff --git a/tests/kwaylandextrastest.cpp b/tests/kwaylandextrastest.cpp -index 3048cb37..2ee86a82 100644 ---- a/tests/kwaylandextrastest.cpp -+++ b/tests/kwaylandextrastest.cpp -@@ -79,16 +79,10 @@ void Window::updateSerial() - - void Window::requestToken() - { -- connect( -- KWaylandExtras::self(), -- &KWaylandExtras::xdgActivationTokenArrived, -- this, -- [this](int /*serial*/, const QString &token) { -+ KWaylandExtras::xdgActivationToken(windowHandle(), KWaylandExtras::self()->lastInputSerial(windowHandle()), QString()) -+ .then(this, [this](const QString &token) { - m_tokenLabel->setText("XDG actvation token: " + token); -- }, -- Qt::SingleShotConnection); -- -- KWaylandExtras::requestXdgActivationToken(windowHandle(), KWaylandExtras::self()->lastInputSerial(windowHandle()), QString()); -+ }); - } - - void Window::exportWindow() --- -GitLab - - -From 1b16c417c697b5d30724ce37d0364af894f6680d Mon Sep 17 00:00:00 2001 -From: Vlad Zahorodnii -Date: Wed, 17 Sep 2025 12:01:53 +0300 -Subject: [PATCH 2/2] Deprecate KWaylandExtras::requestXdgActivationToken() - -KWaylandExtras::xdgActivationToken() provides a more convenient way to -retrieve an xdg activation token. - -Note that the QML side has no corresponding counterpart, however on the -other hand, there is no QML code that uses this function too. If the need -arises, the QML specific API could provide a Promise-like object. ---- - src/CMakeLists.txt | 2 +- - src/kwaylandextras.cpp | 2 ++ - src/kwaylandextras.h | 9 ++++++++- - src/kwindowsystem_p.h | 2 ++ - src/platforms/wayland/windowsystem.cpp | 2 ++ - src/platforms/wayland/windowsystem.h | 2 ++ - 6 files changed, 17 insertions(+), 2 deletions(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index fd72063b..ba748c2c 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -88,7 +88,7 @@ ecm_generate_export_header(KF6WindowSystem - VERSION ${KF_VERSION} - USE_VERSION_HEADER - DEPRECATED_BASE_VERSION 0 -- DEPRECATION_VERSIONS 6.0 -+ DEPRECATION_VERSIONS 6.0 6.19 - EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} - ) - -diff --git a/src/kwaylandextras.cpp b/src/kwaylandextras.cpp -index a5f8af8f..241f80be 100644 ---- a/src/kwaylandextras.cpp -+++ b/src/kwaylandextras.cpp -@@ -26,6 +26,7 @@ KWaylandExtras *KWaylandExtras::self() - return &instance; - } - -+#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(6, 19) - void KWaylandExtras::requestXdgActivationToken(QWindow *window, uint32_t serial, const QString &app_id) - { - auto dv2 = dynamic_cast(KWindowSystem::d_func()); -@@ -39,6 +40,7 @@ void KWaylandExtras::requestXdgActivationToken(QWindow *window, uint32_t serial, - } - dv2->requestToken(window, serial, app_id); - } -+#endif - - quint32 KWaylandExtras::lastInputSerial(QWindow *window) - { -diff --git a/src/kwaylandextras.h b/src/kwaylandextras.h -index 2f763dd5..56424b89 100644 ---- a/src/kwaylandextras.h -+++ b/src/kwaylandextras.h -@@ -31,14 +31,18 @@ public: - */ - static KWaylandExtras *self(); - -+#if KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(6, 19) - /*! - * Requests an xdg_activation_v1 token for a specific window \a win with the given \a app_id. - * - * \a serial Serial of the event that triggered the request. - * - * \sa lastInputSerial -+ * \deprecated [6.19] Use xdgActivationToken() instead. - */ -+ KWINDOWSYSTEM_DEPRECATED_VERSION(6, 19, "Use xdgActivationToken()") - Q_INVOKABLE static void requestXdgActivationToken(QWindow *win, uint32_t serial, const QString &app_id); -+#endif - - /*! - * Offers the seat's current serial for the given \a window. -@@ -83,14 +87,17 @@ public: - static QFuture xdgActivationToken(QWindow *window, const QString &appId); - - Q_SIGNALS: -+#if KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(6, 19) - /*! - * Activation \a token to pass to the client. - * - * \a serial Serial of the event that triggered the request - * - * \sa requestXdgActivationToken -+ * \deprecated [6.19] Use xdgActivationToken() instead. - */ -- void xdgActivationTokenArrived(int serial, const QString &token); -+ KWINDOWSYSTEM_DEPRECATED_VERSION(6, 19, "Use xdgActivationToken()") void xdgActivationTokenArrived(int serial, const QString &token); -+#endif - - /*! - * The \a handle of the given \a window to pass to the client. -diff --git a/src/kwindowsystem_p.h b/src/kwindowsystem_p.h -index e4b51e3e..92997120 100644 ---- a/src/kwindowsystem_p.h -+++ b/src/kwindowsystem_p.h -@@ -27,7 +27,9 @@ public: - class KWINDOWSYSTEM_EXPORT KWindowSystemPrivateV2 : public KWindowSystemPrivate - { - public: -+#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(6, 19) - virtual void requestToken(QWindow *win, uint32_t serial, const QString &app_id) = 0; -+#endif - virtual void setCurrentToken(const QString &token) = 0; - virtual quint32 lastInputSerial(QWindow *window) = 0; - virtual void setMainWindow(QWindow *window, const QString &handle) = 0; -diff --git a/src/platforms/wayland/windowsystem.cpp b/src/platforms/wayland/windowsystem.cpp -index ebb22d78..bc803a4f 100644 ---- a/src/platforms/wayland/windowsystem.cpp -+++ b/src/platforms/wayland/windowsystem.cpp -@@ -74,6 +74,7 @@ void WindowSystem::activateWindow(QWindow *win, long int time) - activation->activate(m_lastToken, s); - } - -+#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(6, 19) - void WindowSystem::requestToken(QWindow *window, uint32_t serial, const QString &app_id) - { - if (window) { -@@ -97,6 +98,7 @@ void WindowSystem::requestToken(QWindow *window, uint32_t serial, const QString - Q_EMIT KWaylandExtras::self()->xdgActivationTokenArrived(serial, token); - }); - } -+#endif - - void WindowSystem::setCurrentToken(const QString &token) - { -diff --git a/src/platforms/wayland/windowsystem.h b/src/platforms/wayland/windowsystem.h -index 4df82388..e9dca128 100644 ---- a/src/platforms/wayland/windowsystem.h -+++ b/src/platforms/wayland/windowsystem.h -@@ -19,7 +19,9 @@ public: - WindowSystem(); - ~WindowSystem() override; - void activateWindow(QWindow *win, long time) override; -+#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(6, 19) - void requestToken(QWindow *win, uint32_t serial, const QString &app_id) override; -+#endif - quint32 lastInputSerial(QWindow *window) override; - void setCurrentToken(const QString &token) override; - bool showingDesktop() override; --- -GitLab -