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

            Bug ID: 508819
           Summary: X11 override-redirect window retain focus after
                    switching to Wayland-native window
    Classification: Plasma
           Product: kwin
      Version First 6.4.4
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: input
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

XWayland under KDE keeps focus on an X11 (override-redirect) window even after
switching to a Wayland-native window. This is not the case after switching to
another X11 window, or if the original window didn't have override-redirect
flag.
With "Allow legacy X11 apps to read keystrokes typed in all apps" enabled (the
default), it means the input is duplicated into two applications, possibly
executing unintended actions.

STEPS TO REPRODUCE
1. Take any override-redirect X11 window that takes input. Example:
`WAYLAND_DISPLAY="" nm-applet` (and click on the icon)
2. Switch to a native Wayland application (like Konsole)
3. Try to type something or use arrows in the Wayland application

OBSERVED RESULT
Both applications act on key events.
`xdotool getwindowfocus` reports nm-applet window still in focus.

EXPECTED RESULT
Only application in focus (Konsole in this example) acts on key events.
Note this behaves correctly if the original X11 window didn't have
override-redirect flag. In that case switching focus to native Wayland window
also switches focus on the X11 side to a (dummy?) 1x1 window with no name
(0x200000 in my case, but I believe this ID is dynamic).

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION

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

Reply via email to