Bug 513604

Summary: Option to allow X11 apps to see all mouse input
Product: [Plasma] kwin Reporter: Kisaragi Hiu <mail>
Component: xwaylandAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: nate
Priority: NOR    
Version First Reported In: 6.5.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Kisaragi Hiu 2025-12-20 10:36:12 UTC
SUMMARY
While there is an option to allow X11 apps to see all keystrokes everywhere (Legacy X11 App Support → Listening for keystrokes: Always allowed), there is no option to allow X11 apps to see the mouse inputs (positions and clicks) everywhere.

This means eg. an input visualizer overlay like Screenkey or https://github.com/univrsal/input-overlay is unable to show mouse clicks if the cursor is in a native Wayland app, and that it is impossible for the user to sacrifice security and opt into visualizing all their mouse inputs.

STEPS TO REPRODUCE
0. (In a Plasma Wayland session)
1. Set System Settings → Legacy X11 App Support → Listening for keystrokes: Always allowed and Listening for mouse buttons: Allowed
2. Relog to apply changes
3. Install an X11 input visualizer like Screenkey or the OBS plugin https://github.com/univrsal/input-overlay; I'll assume Screenkey
4. Start Screenkey.
5. Also open another XWayland window with eg.:
        env QT_QPA_PLATFORM=xcb konsole
6. Notice keystrokes are logged anywhere they happen while mouse clicks are only logged in an XWayland window.

OBSERVED RESULT
The X11 input visualizer is unable to see mouse input from Wayland apps in this configuration. There is no option to allow it to.

EXPECTED RESULT
There is an option to allow an X11 app to see all mouse input.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1
Kernel Version: 6.12.62-1-lts (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
This bug report is spun off of my comment at https://invent.kde.org/plasma/kwin/-/issues/202#note_1370818