https://bugs.kde.org/show_bug.cgi?id=525590

            Bug ID: 525590
           Summary: kwin 6.7.5 introduces focus regression with wine
                    applications
    Classification: Plasma
           Product: kwin
      Version First 6.7.5
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: xwayland
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to