Bug 511684

Summary: Pressing "mouse back" sometimes sends the event to another window and changes focus
Product: [Plasma] plasmashell Reporter: kde49861515
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kde
Priority: NOR    
Version First Reported In: 6.5.1   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description kde49861515 2025-11-05 18:26:02 UTC
SUMMARY
I use mouse buttons on the side of my mouse to go forwards and backwards through webpages etc. pretty regularly, however randomly I will press "mouse back" (whilst the focus of the mouse is still on the specified window, e.g. firefox) but it will bring another window from the background into focus and press "mouse back" on that window instead

I am not sure if this is an application issue or kde / wayland in general, but it happens with different applications. I also alt-tab regularly so I am not sure if this is somehow adding to some kind of "active window" confusion

STEPS TO REPRODUCE
1. Open a few windows (firefox, discord, dolphin, etc.)
2. Alt-tab a few times. Press "mouse forward" / "mouse back" buttons
3. Occasionally, focus on the current main window will be lost and another window from the background grabs the focus and accepts the mouse input - even if your mouse stays within the main window's area

OBSERVED RESULT
Focus lost to random background application
Mouse event "stolen" by background application

EXPECTED RESULT
Mouse event should be sent to the current in-focus window
Window focus should not change

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.3
Kernel Version: 6.17.6-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X3D 8-Core Processor
Memory: 32 GiB of RAM (31.2 GiB usable)
Graphics Processor: AMD Radeon RX 9070 XT

ADDITIONAL INFORMATION
Comment 1 kde49861515 2025-12-01 18:17:16 UTC
Does not occur if Legacy X11 App Support is set to "Prohibited", so this may be related to something like https://bugs.kde.org/show_bug.cgi?id=510404