Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kf6-kwindowsystem for openSUSE:Factory checked in at 2025-10-12 22:22:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kf6-kwindowsystem (Old) and /work/SRC/openSUSE:Factory/.kf6-kwindowsystem.new.18484 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kf6-kwindowsystem" Sun Oct 12 22:22:54 2025 rev:20 rq:1310880 version:6.19.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kf6-kwindowsystem/kf6-kwindowsystem.changes 2025-09-15 19:53:49.293410335 +0200 +++ /work/SRC/openSUSE:Factory/.kf6-kwindowsystem.new.18484/kf6-kwindowsystem.changes 2025-10-12 22:24:13.977392954 +0200 @@ -1,0 +2,20 @@ +Tue Oct 7 17:06:28 UTC 2025 - Christophe Marin <[email protected]> + +- Update to 6.19.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/6/6.19.0 +- Changes since 6.18.0: + * Fix KWaylandExtras::xdgActivationToken when + KWindowSystemPrivateV3 isn't available + * Fix creating empty future + * Update dependency version to 6.19.0 + * make tests more stable + * Deprecate KWaylandExtras::requestXdgActivationToken() + * Add QFuture-based xdg-activation token helpers + * wayland: Drop WaylandXdgActivationTokenV1::failed signal + * wayland: Fix leaking xdg activation objects + * enable build & fix tests on Alpine + * Update version to 6.19.0 + +------------------------------------------------------------------- Old: ---- kwindowsystem-6.18.0.tar.xz kwindowsystem-6.18.0.tar.xz.sig New: ---- kwindowsystem-6.19.0.tar.xz kwindowsystem-6.19.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kf6-kwindowsystem.spec ++++++ --- /var/tmp/diff_new_pack.ZHcsT1/_old 2025-10-12 22:24:14.885430976 +0200 +++ /var/tmp/diff_new_pack.ZHcsT1/_new 2025-10-12 22:24:14.889431143 +0200 @@ -19,11 +19,11 @@ %define qt6_version 6.8.0 %define rname kwindowsystem -# Full KF6 version (e.g. 6.18.0) +# Full KF6 version (e.g. 6.19.0) %{!?_kf6_version: %global _kf6_version %{version}} %bcond_without released Name: kf6-kwindowsystem -Version: 6.18.0 +Version: 6.19.0 Release: 0 Summary: KDE Access to window manager License: LGPL-2.1-or-later ++++++ kwindowsystem-6.18.0.tar.xz -> kwindowsystem-6.19.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/.gitlab-ci.yml new/kwindowsystem-6.19.0/.gitlab-ci.yml --- old/kwindowsystem-6.18.0/.gitlab-ci.yml 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/.gitlab-ci.yml 2025-10-08 11:15:26.000000000 +0200 @@ -6,6 +6,7 @@ file: - /gitlab-templates/linux-qt6.yml - /gitlab-templates/linux-qt6-next.yml + - /gitlab-templates/alpine-qt6.yml - /gitlab-templates/android-qt6.yml - /gitlab-templates/freebsd-qt6.yml - /gitlab-templates/windows-qt6.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/CMakeLists.txt new/kwindowsystem-6.19.0/CMakeLists.txt --- old/kwindowsystem-6.18.0/CMakeLists.txt 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/CMakeLists.txt 2025-10-08 11:15:26.000000000 +0200 @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "6.18.0") # handled by release scripts +set(KF_VERSION "6.19.0") # handled by release scripts project(KWindowSystem VERSION ${KF_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 6.18.0 NO_MODULE) +find_package(ECM 6.19.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/autotests/kwindowinfox11test.cpp new/kwindowsystem-6.19.0/autotests/kwindowinfox11test.cpp --- old/kwindowsystem-6.18.0/autotests/kwindowinfox11test.cpp 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/autotests/kwindowinfox11test.cpp 2025-10-08 11:15:26.000000000 +0200 @@ -243,19 +243,15 @@ QVERIFY(!verifyMinimized(window->winId())); window->showMinimized(); - // TODO: improve by using signalspy? - QTest::qWait(100); // should be minimized, now - QVERIFY(verifyMinimized(window->winId())); + QTRY_VERIFY_WITH_TIMEOUT(verifyMinimized(window->winId()), 500); // back to normal window->showNormal(); - // TODO: improve by using signalspy? - QTest::qWait(100); // should no longer be minimized - QVERIFY(!verifyMinimized(window->winId())); + QTRY_VERIFY_WITH_TIMEOUT(!verifyMinimized(window->winId()), 500); } void KWindowInfoX11Test::testMappingState() @@ -264,16 +260,12 @@ QCOMPARE(info.mappingState(), NET::Visible); window->showMinimized(); - // TODO: improve by using signalspy? - QTest::qWait(100); - KWindowInfo info2(window->winId(), NET::XAWMState); - QCOMPARE(info2.mappingState(), NET::Iconic); + + QTRY_COMPARE_WITH_TIMEOUT(KWindowInfo(window->winId(), NET::XAWMState).mappingState(), NET::Iconic, 500); window->hide(); - // TODO: improve by using signalspy? - QTest::qWait(100); - KWindowInfo info3(window->winId(), NET::XAWMState); - QCOMPARE(info3.mappingState(), NET::Withdrawn); + + QTRY_COMPARE_WITH_TIMEOUT(KWindowInfo(window->winId(), NET::XAWMState).mappingState(), NET::Withdrawn, 500); } void KWindowInfoX11Test::testWindowType_data() @@ -525,10 +517,9 @@ QCOMPARE(info.visibleIconNameWithState(), QStringLiteral("kwindowinfox11test")); window->showMinimized(); - // TODO: improve by using signalspy? - QTest::qWait(100); + // should be minimized, now - QVERIFY(verifyMinimized(window->winId())); + QTRY_VERIFY_WITH_TIMEOUT(verifyMinimized(window->winId()), 500); // that should have changed the visible name KWindowInfo info2(window->winId(), NET::WMName | NET::WMVisibleName | NET::WMIconName | NET::WMVisibleIconName | NET::WMState | NET::XAWMState); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/autotests/kwindowsystem_platform_wayland_test.cpp new/kwindowsystem-6.19.0/autotests/kwindowsystem_platform_wayland_test.cpp --- old/kwindowsystem-6.18.0/autotests/kwindowsystem_platform_wayland_test.cpp 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/autotests/kwindowsystem_platform_wayland_test.cpp 2025-10-08 11:15:26.000000000 +0200 @@ -21,42 +21,35 @@ private: std::unique_ptr<QProcess> m_westonProcess; + QTemporaryDir m_xdgRuntimeDir; }; void TestKWindowsystemPlatformWayland::initTestCase() { + // we need weston, else skip this const QString westonExec = QStandardPaths::findExecutable(QStringLiteral("weston")); + if (westonExec.isEmpty()) { + QSKIP("Weston is not installed"); + } + + // we need a valid XDG_RUNTIME_DIR, separate it from the one the user might have + QVERIFY(m_xdgRuntimeDir.isValid()); + qputenv("XDG_RUNTIME_DIR", m_xdgRuntimeDir.path().toLocal8Bit()); // start Weston m_westonProcess.reset(new QProcess); m_westonProcess->setProgram(westonExec); - m_westonProcess->setArguments(QStringList({QStringLiteral("--socket=kwindowsystem-platform-wayland-0"), QStringLiteral("--backend=headless-backend.so")})); + m_westonProcess->setProcessChannelMode(QProcess::ForwardedChannels); + m_westonProcess->setArguments(QStringList({QStringLiteral("--socket=kwindowsystem-platform-wayland-0"), + QStringLiteral("--backend=headless"), + QStringLiteral("--shell=kiosk"), + QStringLiteral("--no-config")})); m_westonProcess->start(); - if (!m_westonProcess->waitForStarted()) { - m_westonProcess.reset(); - QSKIP("Weston could not be started"); - } + QVERIFY(m_westonProcess->waitForStarted()); // wait for the socket to appear - QTest::qWait(500); - - QDir runtimeDir(qgetenv("XDG_RUNTIME_DIR")); - if (runtimeDir.exists(QStringLiteral("kwindowsystem-platform-wayland-0"))) { - // already there - return; - } - - std::unique_ptr<QFileSystemWatcher> socketWatcher(new QFileSystemWatcher(QStringList({runtimeDir.absolutePath()}))); - QSignalSpy socketSpy(socketWatcher.get(), &QFileSystemWatcher::directoryChanged); - QVERIFY(socketSpy.isValid()); - - // limit to max of 10 waits - for (int i = 0; i < 10; i++) { - QVERIFY(socketSpy.wait()); - if (runtimeDir.exists(QStringLiteral("kwindowsystem-platform-wayland-0"))) { - return; - } - } + const QDir runtimeDir(m_xdgRuntimeDir.path()); + QTRY_VERIFY_WITH_TIMEOUT(runtimeDir.exists(QStringLiteral("kwindowsystem-platform-wayland-0")), 5000); } void TestKWindowsystemPlatformWayland::cleanupTestCase() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/autotests/kwindowsystemx11test.cpp new/kwindowsystem-6.19.0/autotests/kwindowsystemx11test.cpp --- old/kwindowsystem-6.18.0/autotests/kwindowsystemx11test.cpp 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/autotests/kwindowsystemx11test.cpp 2025-10-08 11:15:26.000000000 +0200 @@ -67,7 +67,7 @@ std::unique_ptr<QWidget> widget(new QWidget); widget->show(); QVERIFY(QTest::qWaitForWindowExposed(widget.get())); - QVERIFY(spy.count() > 0); + QTRY_VERIFY_WITH_TIMEOUT(spy.count() > 0, 500); bool hasWId = false; for (auto it = spy.constBegin(); it != spy.constEnd(); ++it) { if ((*it).isEmpty()) { @@ -90,13 +90,13 @@ std::unique_ptr<QWidget> widget(new QWidget); widget->show(); QVERIFY(QTest::qWaitForWindowExposed(widget.get())); - QVERIFY(KX11Extras::hasWId(widget->winId())); + QTRY_VERIFY_WITH_TIMEOUT(KX11Extras::hasWId(widget->winId()), 500); QSignalSpy spy(KX11Extras::self(), &KX11Extras::windowRemoved); widget->hide(); spy.wait(1000); QCOMPARE(spy.first().at(0).toULongLong(), widget->winId()); - QVERIFY(!KX11Extras::hasWId(widget->winId())); + QTRY_VERIFY_WITH_TIMEOUT(!KX11Extras::hasWId(widget->winId()), 500); } void KWindowSystemX11Test::testDesktopChanged() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/src/CMakeLists.txt new/kwindowsystem-6.19.0/src/CMakeLists.txt --- old/kwindowsystem-6.18.0/src/CMakeLists.txt 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/src/CMakeLists.txt 2025-10-08 11:15:26.000000000 +0200 @@ -88,7 +88,7 @@ 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/src/kwaylandextras.cpp new/kwindowsystem-6.19.0/src/kwaylandextras.cpp --- old/kwindowsystem-6.18.0/src/kwaylandextras.cpp 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/src/kwaylandextras.cpp 2025-10-08 11:15:26.000000000 +0200 @@ -26,6 +26,7 @@ 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<KWindowSystemPrivateV2 *>(KWindowSystem::d_func()); @@ -39,6 +40,7 @@ } dv2->requestToken(window, serial, app_id); } +#endif quint32 KWaylandExtras::lastInputSerial(QWindow *window) { @@ -63,4 +65,36 @@ } } +QFuture<QString> KWaylandExtras::xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId) +{ + if (auto dv3 = dynamic_cast<KWindowSystemPrivateV3 *>(KWindowSystem::d_func())) { + return dv3->xdgActivationToken(window, serial, appId); + } else { +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(6, 19) + requestXdgActivationToken(window, serial, appId); + QPromise<QString> promise; + auto future = promise.future(); + + connect( + self(), + &KWaylandExtras::xdgActivationTokenArrived, + self(), + [p = std::move(promise)](int /*serial*/, const QString &token) mutable { + p.addResult(token); + p.finish(); + }, + Qt::SingleShotConnection); + + return future; +#else + return QtFuture::makeReadyValueFuture(QString()); +#endif + } +} + +QFuture<QString> KWaylandExtras::xdgActivationToken(QWindow *window, const QString &appId) +{ + return xdgActivationToken(window, lastInputSerial(window), appId); +} + #include "moc_kwaylandextras.cpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/src/kwaylandextras.h new/kwindowsystem-6.19.0/src/kwaylandextras.h --- old/kwindowsystem-6.18.0/src/kwaylandextras.h 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/src/kwaylandextras.h 2025-10-08 11:15:26.000000000 +0200 @@ -9,6 +9,7 @@ #ifndef KWAYLANDEXTRAS_H #define KWAYLANDEXTRAS_H +#include <QFuture> #include <QObject> #include <QWindow> @@ -30,14 +31,18 @@ */ 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. @@ -61,15 +66,38 @@ */ 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<QString> 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<QString> 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/src/kwindowsystem_p.h new/kwindowsystem-6.19.0/src/kwindowsystem_p.h --- old/kwindowsystem-6.18.0/src/kwindowsystem_p.h 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/src/kwindowsystem_p.h 2025-10-08 11:15:26.000000000 +0200 @@ -7,6 +7,8 @@ #define KWINDOWSYSTEM_P_H #include "netwm_def.h" + +#include <QFuture> #include <QStringList> #include <QWidgetList> //For WId #include <kwindowsystem_export.h> @@ -25,7 +27,9 @@ 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; @@ -33,4 +37,10 @@ virtual void unexportWindow(QWindow *window) = 0; }; +class KWINDOWSYSTEM_EXPORT KWindowSystemPrivateV3 : public KWindowSystemPrivateV2 +{ +public: + virtual QFuture<QString> xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId) = 0; +}; + #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/src/platforms/wayland/waylandxdgactivationv1_p.h new/kwindowsystem-6.19.0/src/platforms/wayland/waylandxdgactivationv1_p.h --- old/kwindowsystem-6.18.0/src/platforms/wayland/waylandxdgactivationv1_p.h 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/src/platforms/wayland/waylandxdgactivationv1_p.h 2025-10-08 11:15:26.000000000 +0200 @@ -8,7 +8,10 @@ #define WAYLANDXDGACTIVATIONV1_P_H #include "qwayland-xdg-activation-v1.h" + +#include <QFuture> #include <QObject> +#include <QPromise> #include <QtWaylandClient/QWaylandClientExtension> class QWaylandSurface; @@ -16,15 +19,38 @@ class WaylandXdgActivationTokenV1 : public QObject, public QtWayland::xdg_activation_token_v1 { Q_OBJECT + public: + WaylandXdgActivationTokenV1() + { + m_promise.start(); + } + + ~WaylandXdgActivationTokenV1() override + { + destroy(); + } + + QFuture<QString> 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 failed(); void done(const QString &token); + +private: + QPromise<QString> m_promise; }; class WaylandXdgActivationV1 : public QWaylandClientExtensionTemplate<WaylandXdgActivationV1>, public QtWayland::xdg_activation_v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/src/platforms/wayland/windowsystem.cpp new/kwindowsystem-6.19.0/src/platforms/wayland/windowsystem.cpp --- old/kwindowsystem-6.18.0/src/platforms/wayland/windowsystem.cpp 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/src/platforms/wayland/windowsystem.cpp 2025-10-08 11:15:26.000000000 +0200 @@ -50,9 +50,7 @@ }; WindowSystem::WindowSystem() - : QObject() - , KWindowSystemPrivateV2() - , m_lastToken(qEnvironmentVariable("XDG_ACTIVATION_TOKEN")) + : m_lastToken(qEnvironmentVariable("XDG_ACTIVATION_TOKEN")) { m_windowManagement = new WindowManagement; } @@ -76,6 +74,7 @@ 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) { @@ -95,13 +94,11 @@ 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); }); } +#endif void WindowSystem::setCurrentToken(const QString &token) { @@ -306,4 +303,25 @@ } } +QFuture<QString> WindowSystem::xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId) +{ + WaylandXdgActivationV1 *activation = WaylandXdgActivationV1::self(); + if (!activation->isActive()) { + return QtFuture::makeReadyValueFuture(QString()); + } + + auto waylandApp = qGuiApp->nativeInterface<QNativeInterface::QWaylandApplication>(); + if (!waylandApp) { + return QtFuture::makeReadyValueFuture(QString()); + } + + 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/src/platforms/wayland/windowsystem.h new/kwindowsystem-6.19.0/src/platforms/wayland/windowsystem.h --- old/kwindowsystem-6.18.0/src/platforms/wayland/windowsystem.h 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/src/platforms/wayland/windowsystem.h 2025-10-08 11:15:26.000000000 +0200 @@ -12,14 +12,16 @@ class WindowManagement; -class WindowSystem : public QObject, public KWindowSystemPrivateV2 +class WindowSystem : public QObject, public KWindowSystemPrivateV3 { Q_OBJECT 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; @@ -27,6 +29,7 @@ void exportWindow(QWindow *window) override; void unexportWindow(QWindow *window) override; void setMainWindow(QWindow *window, const QString &handle) override; + QFuture<QString> xdgActivationToken(QWindow *window, uint32_t serial, const QString &appId) override; protected: bool eventFilter(QObject *watched, QEvent *event) override; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/tests/activationtest.cpp new/kwindowsystem-6.19.0/tests/activationtest.cpp --- old/kwindowsystem-6.18.0/tests/activationtest.cpp 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/tests/activationtest.cpp 2025-10-08 11:15:26.000000000 +0200 @@ -28,13 +28,12 @@ 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-6.18.0/tests/kwaylandextrastest.cpp new/kwindowsystem-6.19.0/tests/kwaylandextrastest.cpp --- old/kwindowsystem-6.18.0/tests/kwaylandextrastest.cpp 2025-09-08 10:15:17.000000000 +0200 +++ new/kwindowsystem-6.19.0/tests/kwaylandextrastest.cpp 2025-10-08 11:15:26.000000000 +0200 @@ -79,16 +79,10 @@ 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()
