Bug 498424 - Steam steals focus on Wayland even with the window being covered and clicks to covering windows are instead sent to Steam
Summary: Steam steals focus on Wayland even with the window being covered and clicks t...
Status: RESOLVED DUPLICATE of bug 490057
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 6.2.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-09 11:30 UTC by tesfabpel
Modified: 2025-01-10 19:41 UTC (History)
2 users (show)

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


Attachments
Video of the problem (3.45 MB, video/x-matroska)
2025-01-10 19:41 UTC, tesfabpel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tesfabpel 2025-01-09 11:30:05 UTC
SUMMARY
After playing a game (mostly with Proton (Wine), so both Steam and the game are run under XWayland), sometimes Steam gets the focus without raising the window. I also usually have Firefox (Wayland, IIRC) open.

What it happens is that, after exiting the game, I see the Firefox window on top but on the taskbar Steam is active.
When I click inside the Firefox window, Steam gets the input instead.
To fix this, I have to force the Steam's window to be visible and then switch back to Firefox (or other windows). Then everything resumes to work fine.

STEPS TO REPRODUCE
1. Open Steam
2. Launch a game (preferably a game running via Proton, such that it uses XWayland. IDK if it's required, though)
3. Open Firefox (or other apps, I mostly have Firefox open so...)
4. Alt-Tab between the game and Firefox (imagine I'm searching a wiki of the game for items' descriptions)
5. Exit the game
6. Firefox should be the visible window; try to interact with it

OBSERVED RESULT
Sometimes, Steam receives the focus but the window isn't visibile because it's covered by Firefox.
Yet, KWin thinks somehow that the input events should be sent to Steam, instead to Firefox.
To restore the correct behavior, switch to Steam and then switch back to Firefox.

EXPECTED RESULT
If Steam gets the focus, KWin should work correctly.
Otherwise, Steam shouldn't get the focus and the last active window (Firefox) should get it, instead.
In any case, the behavior MUST be coherent between focused window and visible window.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: ArchLinux, Plasma/kwin 6.2.5, Wayland
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
Comment 1 Zamundaaa 2025-01-09 14:22:33 UTC

*** This bug has been marked as a duplicate of bug 490057 ***
Comment 2 tesfabpel 2025-01-10 19:41:01 UTC
Created attachment 177265 [details]
Video of the problem

WARNING: Contains spoilers for the game Phoenix Wright: Ace Attorney Trilogy (T&T Episode 2, more specifically).

This happened DURING playing while I had to Alt-Tab to Firefox.