78 lines
2.8 KiB
Diff
78 lines
2.8 KiB
Diff
From b05d0431d741510c12294c85dc5ce001a8aceca2 Mon Sep 17 00:00:00 2001
|
|
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
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 <vlad.zahorodnii@kde.org>
|
|
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<QNativeInterface::QWaylandApplication>();
|
|
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
|
|
|