Bug 484835 - Proton games do not lock onto game window on a multi-monitor setup since 6.0.x
Summary: Proton games do not lock onto game window on a multi-monitor setup since 6.0.x
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-31 20:05 UTC by Ashcon Mohseninia
Modified: 2024-09-30 11:08 UTC (History)
4 users (show)

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


Attachments
Demo showing the bug (2.02 MB, video/mp4)
2024-03-31 20:05 UTC, Ashcon Mohseninia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ashcon Mohseninia 2024-03-31 20:05:44 UTC
Created attachment 167998 [details]
Demo showing the bug

SUMMARY
When playing a game on a multi-monitor setup, the mouse can escape the main monitor (Where the game is being played), but is teleported back to the window fairly quickly.

The issue is that when it is outside the window, clicking (IE: Firing a weapon), instead causes the focus of the game to be lost, and the other monitors become the focus.

What is interesting, is since 6.0.3, the game still looks around as if the mouse is still present in the game window. Pre 6.0.3, the mouse would move outside the window and the game would stop looking around.

STEPS TO REPRODUCE
1. Play a proton Game on any version of plasma 6.0.x on a multi-monitor setup
2. Try to look around
3. Notice that the mouse is escaping the main game window.

I've attached a video here to show the bug in action

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
Comment 1 Adel KARA SLIMANE 2024-05-31 14:29:01 UTC
Hello,

I am experiencing this exact same issue.

- Overwatch 2: issue happens in both Borderless Windowed and Fullscreen mode
- Wayland platform
- KDE Plasma 6.0.5
- KDE Frameworks 6.2.0
- Qt Version 6.7.1
- Archlinux with kernel 6.9.2-zen1-1-zen 
- dGPU RX 7900 XTX 
  - Monitor 1: QHD@270Hz DP connection, landscape, VRR enabled
  - Monitor 2: QHD@144Hz HDMI connection, portrait, VRR disabled
  - Global zoom 125%
- CPU + iGPU 7800X3D
Comment 2 Adel KARA SLIMANE 2024-09-29 18:30:00 UTC
With Kwin_wayland 6.1.5  and wine 9.18r1 (XWayland) this issue does not happen anymore.
Comment 3 Zamundaaa 2024-09-29 19:59:07 UTC
Great!
Comment 4 Adel KARA SLIMANE 2024-09-29 22:33:18 UTC
Note that the fix came from wine and not KDE. This issue was also happening on KDE Xorg and Gnome Wayland and Xorg. I updated to newer wine-tkg 9.18r1 and played on KDE Wayland 6.1.5 where the issue was happening, and it did not happen at all.

An interesting thing I noticed is that the game was losing the mosque grab way more frequently when I had firefox (Wayland mode) open in the second screen (with the older wine-tkg 9.1 that I was playing with).
Comment 5 Zamundaaa 2024-09-30 11:08:06 UTC
ok, adjusting the bug status to match that.