DESCRIPTION After upgrading to kwin 6.7.5, wine windows using Xwayland no longer get keyboard focus after clicking them. Clicking will raise the window but will not give it keyboard focus. Reverting this commit https://github.com/KDE/kwin/commit/da716de0db06a6323e3604be9585b2ae0f9df6ae seems to have fixed the problem. STEPS TO REPRODUCE 1. Use kwin 6.7.5 2. Ensure "Focus stealing prevention" is "Low" or higher, and "Window activation policy" is "Click to focus". 3. Launch `wine explorer` (target window), `glxgears` (xwayland reference window), and `konsole` (native wayland reference window) 4. Focus konsole, then switch focus to wine. Try to type in the location bar. Observe that keyboard input goes to konsole instead. 5. Focus glxgears, then switch focus to wine. Try to type in the location bar. Observe that keyboard input correctly appears in the location bar. OBSERVED RESULT Wine window is raised when clicked but does not accept keyboard input. EXPECTED RESULT Wine window accepts keyboard input when clicked. SOFTWARE/OS VERSIONS Operating System: Fedora 44 KDE Plasma Version: 6.7.5 KDE Frameworks Version: 6.30.0 Qt Version: 6.11.2 ADDITIONAL INFORMATION Setting "Focus stealing prevention" to "None" seems to fix this. `xprop WM_HINTS WM_PROTOCOLS` on a wine window reports the following: WM_HINTS(WM_HINTS): Client accepts input or input focus: False Initial state is Normal State. bitmap id # to use for icon: 0x2c002b1 bitmap id # of mask for icon: 0x2c002b3 window id # of group leader: 0x2e00001 WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, _NET_WM_PING, WM_TAKE_FOCUS Setting wine's UseTakeFocus to N also seems to fix this and changes the xprop output to the following: WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0x28002b1 bitmap id # of mask for icon: 0x28002b3 window id # of group leader: 0x2a00001 WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, _NET_WM_PING
I guess focus stealing prevention didn't play nice with the new change. You click window, kwin tells window that it should take focus but no longer gives it focus anymore (per new commit which makes kwin behave closer to the x11 icccm spec), app then requests focus for the window in response to the focus request but then is immediately denied by kwin for focus stealing prevention reasons. The window shows up orange in the plasmashell task manager as expected of a window that was prevented from taking focus.
*** Bug 525493 has been marked as a duplicate of this bug. ***
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/9941
FWIW I can't replicate the issue. It's probably still safest to revert it for 6.7, but finding the exact conditions for triggering the issue would be useful.
Git commit 6e2b60205545a4023ff3202114c07d11b22040ce by Vlad Zahorodnii. Committed on 16/09/2026 at 13:19. Pushed by vladz into branch 'master'. Revert "Reapply "Handle "Globally Active" input model more gracefully"" This reverts commit 5c2f04469d0640054e0f2e34e1adf8b62c79a508. Unfortunately, that caused regressions of its own. Given that SDL merged our patch [1] to skip announcing WM_TAKE_FOCUS, let's revert the focus code back to the original state that we had in 6.7. [1] https://github.com/libsdl-org/SDL/pull/16150 M +1 -3 src/activation.cpp M +0 -5 src/window.cpp M +0 -1 src/window.h M +0 -5 src/x11window.cpp M +0 -1 src/x11window.h https://invent.kde.org/plasma/kwin/-/commit/6e2b60205545a4023ff3202114c07d11b22040ce
*** Bug 525542 has been marked as a duplicate of this bug. ***
Git commit c32592ab5c3f9c652c8ce711704ca93eb1d32c56 by Vlad Zahorodnii. Committed on 17/09/2026 at 06:06. Pushed by vladz into branch 'Plasma/6.8'. Revert "Reapply "Handle "Globally Active" input model more gracefully"" This reverts commit 5c2f04469d0640054e0f2e34e1adf8b62c79a508. Unfortunately, that caused regressions of its own. Given that SDL merged our patch [1] to skip announcing WM_TAKE_FOCUS, let's revert the focus code back to the original state that we had in 6.7. [1] https://github.com/libsdl-org/SDL/pull/16150 (cherry picked from commit 6e2b60205545a4023ff3202114c07d11b22040ce) Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> M +1 -3 src/activation.cpp M +0 -5 src/window.cpp M +0 -1 src/window.h M +0 -5 src/x11window.cpp M +0 -1 src/x11window.h https://invent.kde.org/plasma/kwin/-/commit/c32592ab5c3f9c652c8ce711704ca93eb1d32c56
Git commit ef6fa8354d428dcaf8a92841f77fd96cccfa2c11 by Vlad Zahorodnii. Committed on 17/09/2026 at 06:06. Pushed by vladz into branch 'Plasma/6.7'. Revert "Reapply "Handle "Globally Active" input model more gracefully"" This reverts commit 5c2f04469d0640054e0f2e34e1adf8b62c79a508. Unfortunately, that caused regressions of its own. Given that SDL merged our patch [1] to skip announcing WM_TAKE_FOCUS, let's revert the focus code back to the original state that we had in 6.7. [1] https://github.com/libsdl-org/SDL/pull/16150 (cherry picked from commit 6e2b60205545a4023ff3202114c07d11b22040ce) Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> M +1 -3 src/activation.cpp M +0 -5 src/window.cpp M +0 -1 src/window.h M +0 -5 src/x11window.cpp M +0 -1 src/x11window.h https://invent.kde.org/plasma/kwin/-/commit/ef6fa8354d428dcaf8a92841f77fd96cccfa2c11
*** Bug 526000 has been marked as a duplicate of this bug. ***