Bug 482651 - Cursor not locked to window in proton/wine games when using Wayland
Summary: Cursor not locked to window in proton/wine games when using Wayland
Status: RESOLVED DUPLICATE of bug 477124
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
Keywords: qt6
Depends on:
Reported: 2024-03-07 06:32 UTC by TONKAHANAH
Modified: 2024-03-12 15:25 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description TONKAHANAH 2024-03-07 06:32:45 UTC
1.  launch a wine/proton games in a wayland session 
2. move your mouse around

1. Games will open properly and mouse cursor seems to function fine for menus, mouse issue do not appear to be noticeable in games where you always have a traditional cursor (such a point and click game). 
2. Games where the mouse cursor is hidden and mapped to a view such as your camera, most famously in first person type games will cause the player view to jump around sporadically and/or has limited ability to turn/look left to right as if the mouse cursor is still there but hidden and is hitting the edge of the screen space. Some games even fail to grab the mouse input at all yet using the mouse cursor in said games works perfectly fine. 
3. running the same games with in a X11 session does not exhibit the same symptoms or issues, everything works as expected. 

1. When playing a game, the mouse gets locked to the game space when said game space is selected
2. when "locked" to the game space/window the mouse can perform all its normal functions being both a cursor in menus and full control of the camera/view (or whatever other analog mouse input function said game might have) 

Linux:  Arch 6.7.8-arch1-1
KDE Plasma Version: Plasma 6.0.1 
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

AMD Ryzen 5 3600X 6-Core Processor
16gb ddr RAM
AMD XFX Radeon RX 6700xt

A temporary workaround for this issue has been loading up winecfg (via protontricks) for the effected titles and selecting the option "Automatically capture mouse in full screen windows" under the graphics tab. Additionally, for titles where no mouse input would get captured at all, I had to also enable the virtual desktop under the same winecfg graphics tab. these were things I did not have to do before my package manager served me plasma 6 in todays updates. 

native linux titles do not seem to be effected by this issue
Comment 1 Karsten 2024-03-07 16:45:00 UTC
There is a similar issue when using GeforceNOW or Amazon Luna.
The keyboard inputs can get stuck so you keep walking for example. The mouse can also be moved to the second screen while it should be captured on the first screen (when not in a game menu)
Comment 2 Karsten 2024-03-07 23:08:05 UTC
The issue also happens with only one active display.
With x11 as graphic platform the issue disappears.
Comment 3 Zamundaaa 2024-03-12 15:25:02 UTC

*** This bug has been marked as a duplicate of bug 477124 ***