gamescope
gamescope copied to clipboard
Problem with mouse position/offset
The latest version of gamescope has an issue where the "select" position of the mouse is not properly mapped to it's position. For example, if my mouse is at the bottom right of the screen, then buttons in a UI will be highlighted up and to the left.
It's sort of like the area of the screen that the mouse is mapped to is not lined up with the area that the mouse can move to.
Happens regardless of if it's in full screen or not, and the window size doesn't matter either.
OS: Arch Linux x86_64 Kernel: 6.8.2-arch2-1 Shell: bash 5.2.26 DE: Plasma 6.0.3 WM: kwin CPU: AMD Ryzen 7 5800X (16) @ 3.800GHz GPU: AMD ATI Radeon RX 7900 GRE Memory: 8074MiB / 32018MiB
Is this in wayland?
I'm also having this issue on Plasma 6.0.4.1 (wayland) and gamescope 3.14.12, so it seems like it might be a plasma issue. --force-grab-cursor is a workaround. This is a multi monitor setup and the game monitor has scaling enabled.
I'm also having this issue on Gamescope 3.14.15 and Plasma Kwin 6.0.90.1. This issue also applies to Xournalpp with GDK_BACKEND=X11 (so this rules out Wine issues). The misalignment only happens when scaling is enabled. Also, when I start gamescope with gamescope -W 3840 -H 2160 -- env GDK_BACKEND=x11 xournalpp and scaling enabled, the gamescope window is much bigger than the bounds of the 4k monitor (it overflows onto the other monitor), which again seems like a scaling issue. Conversely, doing the same while scaling is disabled makes the window fit roughly on the 4k monitor.
So I guess something is going wrong with the scaling communications between Gamescope and Plasma. Any ideas on where to debug?
Using a wrapper script which changes scale is a workaround too:
#!/bin/sh
kscreen-doctor output.1.scale.1
gamescope "$@"
kscreen-doctor output.1.scale.1.5
EDIT: I guess this is a duplicate of #1208
This bug no longer seems to happen after 09cb7b451d8825e597d15ab9d30e43aee8418670. The windows is still much bigger than the bounds of the 4k monitor but that is easily worked around by just fullscreening.
EDIT: The window size issue appears to be specific to Xournalpp and does not appear to happen for Wine/Proton clients