Bug 463256

Summary: System not reading input from a mouse when alt tabbing to game (run by Lutris&wine) on wayland. Xorg seems fine.
Product: [Plasma] kwin Reporter: gigastarcraft2
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: ivan.cukic, nate, opensource
Priority: NOR    
Version First Reported In: 5.26.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description gigastarcraft2 2022-12-20 03:35:40 UTC
SUMMARY
I encountered this bug while alt tabbing out Starcraft 2 and Heroes 3 of might and magic when game is loaded. Some other games works fine like Dark Souls 3.

STEPS TO REPRODUCE
1. Alt tab from game.
2. Alt tab back into game (immediately). This can be tricky and sometimes cursor changes to game and everything works ok.
3. Cursor changes to system's cursor not game's.
4. If you want game to record mouse input you have to hold alt tab for a brief moment or click on icon on cons only task manager.

OBSERVED RESULT
Neither game nor input-onerlay plugin reads mouse input. Keyboard works fine.

EXPECTED RESULT
Game and input-verlay reads mouse input without having to trick alt tab bug.

SOFTWARE/OS VERSIONS 
Linux/KDE Plasma:  6.0.12-artix1-1 (64 bit)
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
https://vimeo.com/manage/videos/782770161
Comment 1 Mathieu Jobin 2023-01-31 23:38:43 UTC
This seems related to the bug I wanted to report.

On XOrg, I love to alt-tab and mouse click the window I want to select...

On Wayland, it does not work. I think this might be for the same reason as this bug report.
Comment 2 Mathieu Jobin 2023-01-31 23:40:34 UTC
Note, I am not playing a game, I am just a regular desktop user.
I use Firefox, Konsole, Kate and Slack the most.

```
Operating System: Kubuntu 22.10
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.6
Kernel Version: 5.19.0-26-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 19.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: FUJITSU
Product Name: FMVWB3U28
```
Comment 3 gigastarcraft2 2023-09-25 09:49:59 UTC
I do not know when but it seems fixed for me.
Comment 4 Nate Graham 2023-09-25 19:37:34 UTC
Awesome, thanks!