Bug 525590 - kwin 6.7.5 introduces focus regression with wine applications
Summary: kwin 6.7.5 introduces focus regression with wine applications
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: xwayland (other bugs)
Version First Reported In: 6.7.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 525493 525542 526000 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-09-12 11:25 UTC by iczero4
Modified: 2026-10-04 19:40 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.6
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iczero4 2026-09-12 11:25:15 UTC
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
Comment 1 iczero4 2026-09-12 12:28:04 UTC
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.
Comment 2 Zamundaaa 2026-09-16 12:06:17 UTC
*** Bug 525493 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2026-09-16 12:38:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/9941
Comment 4 Zamundaaa 2026-09-16 13:05:22 UTC
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.
Comment 5 Vlad Zahorodnii 2026-09-16 14:00:54 UTC
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
Comment 6 Vlad Zahorodnii 2026-09-16 14:57:01 UTC
*** Bug 525542 has been marked as a duplicate of this bug. ***
Comment 7 Vlad Zahorodnii 2026-09-17 06:29:25 UTC
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
Comment 8 Vlad Zahorodnii 2026-09-17 06:36:47 UTC
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
Comment 9 Greg Burman 2026-10-04 19:40:35 UTC
*** Bug 526000 has been marked as a duplicate of this bug. ***