SUMMARY KWindowSystem::activateWindow() called from Qt 5 application running in Plasma 6 Wayland environment does nothing. "QWindow::fromWinId(): platform plugin does not support foreign windows." warning is seen in stderr. STEPS TO REPRODUCE 1. Run Qt 5 application using KWindowSystem::activateWindow() function in Plasma 6 2. Make it so it's called OBSERVED RESULT Window is not activated, warning is seen in stderr. EXPECTED RESULT Window is activated through xdg-activation protocol SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE Tumbleweed 20241114 KDE Plasma Version: 6.2.3 KDE Frameworks Version: 5.116.0 Qt Version: 5.15.15+kde127 ADDITIONAL INFORMATION This is probably somehow related to this change: https://github.com/KDE/kwayland-integration/commit/f2f14df48616f31bee62d3f57d9f08278aa8888d#diff-a1327a30e90efe63958cf1f12637a94e2a7e5fc93996bd96664ba001d8626ea9L66
I'm afraid KF5 is no longer developed, so there's not much hope of this being fixed for KF5-using apps.
(In reply to Nate Graham from comment #1) > I'm afraid KF5 is no longer developed, so there's not much hope of this > being fixed for KF5-using apps. But the Wayland plugin for KF5WindowSystem is actually part of Plasma 6, no?
If the issue on that side of it, yes. If it requires changes on the other side, then no. CCing some some people more intelligent than me who can probably help make that determination.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwayland-integration/-/merge_requests/66
Git commit d7d9c1bb4b3a1c5d65137334cb4e6472211c2a16 by Nicolas Fella. Committed on 25/11/2024 at 14:00. Pushed by nicolasfella into branch 'master'. Fix obtaining wl_surface from WId f2f14df48616f31bee62d3f57d9f08278aa8888d ported from KWayland::Surface::fromQtWinId to QWindow::fromWinId, but QWindow::fromWinId doesn't work on Wayland. Instead copy the implementation from KWayland and use that M +25 -1 src/windowsystem/windowsystem.cpp https://invent.kde.org/plasma/kwayland-integration/-/commit/d7d9c1bb4b3a1c5d65137334cb4e6472211c2a16
Git commit 0bd61486dec73c515708e944c99d1f6b4cb77164 by Nicolas Fella. Committed on 25/11/2024 at 14:00. Pushed by nicolasfella into branch 'master'. Initialize xdg activation Otherwise it only works the second time we try to use it M +1 -0 src/windowsystem/waylandxdgactivationv1.cpp https://invent.kde.org/plasma/kwayland-integration/-/commit/0bd61486dec73c515708e944c99d1f6b4cb77164
Git commit 5a47aa1159d31c1998d3a2addde2266226a2cb23 by Nicolas Fella. Committed on 25/11/2024 at 14:20. Pushed by nicolasfella into branch 'Plasma/6.2'. Initialize xdg activation Otherwise it only works the second time we try to use it (cherry picked from commit 0bd61486dec73c515708e944c99d1f6b4cb77164) M +1 -0 src/windowsystem/waylandxdgactivationv1.cpp https://invent.kde.org/plasma/kwayland-integration/-/commit/5a47aa1159d31c1998d3a2addde2266226a2cb23
Git commit 1432f93ed23dd73f7f9a9606da4bb5cf531a8ed9 by Nicolas Fella. Committed on 25/11/2024 at 14:20. Pushed by nicolasfella into branch 'Plasma/6.2'. Fix obtaining wl_surface from WId f2f14df48616f31bee62d3f57d9f08278aa8888d ported from KWayland::Surface::fromQtWinId to QWindow::fromWinId, but QWindow::fromWinId doesn't work on Wayland. Instead copy the implementation from KWayland and use that (cherry picked from commit d7d9c1bb4b3a1c5d65137334cb4e6472211c2a16) M +25 -1 src/windowsystem/windowsystem.cpp https://invent.kde.org/plasma/kwayland-integration/-/commit/1432f93ed23dd73f7f9a9606da4bb5cf531a8ed9