Cursor not locking to games in fullscreen

Operating System: Debian GNU/Linux 13
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.12.33+deb13-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 11th Gen Intel® Core™ i5-11400 @ 2.60GHz
Memory: 31.2 GiB of RAM
Graphics Processor: AMD Radeon RX 6750 XT

I am using Steam flatpak, however this issue persists with the native Steam. Mostly every game I run, the cursor moves off the primary screen, even in fullscreen. I have tried gamescope without avail, and I have tried adjusting the settings in the problematic games. Can anyone help?

I should note that this is definitely not a Wayland issue per se, as I switched to an X11 instance and it still occurred.

I hesitate to call this “Solved”, so I’ll wait for a more concrete answer. I found a way to force the cursor to lock in fullscreen without using Gamescope. Before continuing, I am using the Steam Flatpak version. However, as I mentioned earlier, this problem also persists in native Steam. My “solution” only covers the flatpak Steam.

First thing to do is have the latest Proton-GE which ships as an add-on with the Steam flatpak. This is done because (for some reason) Valve’s Proton does let you edit “Input” in winecfg.

flatpak install com.valvesoftware.Steam.CompatibilityTool.Proton-GE

Restart Steam, and select the flatpak Proton-GE for your Proton version.

Install Protontricks, do the necessary permissions if it asks for it, and find your game you need to fix.

Go to winecfg, go to the Input tab, and select “Automatically capture the mouse in full-screen windows”. Apply it, and run your game, it should work.

If anyone more knowledgeable can specify if this is a KDE issue or a Proton issue, please help! I’m inclined to say it’s a KDE issue, because I was on Linux Mint Cinnamon before this without any issue.