diff --git a/tools/gamescope/PATCHES.md b/tools/gamescope/PATCHES.md index d3e692d427..8fa2649046 100644 --- a/tools/gamescope/PATCHES.md +++ b/tools/gamescope/PATCHES.md @@ -22,6 +22,11 @@ library list, before anything is published. `up`) - the one a Steam Deck's touchscreen drives - so what a touch does follows the client's touch mode (Steam's Big Picture sets Passthrough: a real touch, rows scroll under a finger). Finger ids are offset by one, since the nested pointer already moves wlserver's touch 0. +- `0111-wayland-pointer-warps-in-passthrough.patch` - this app: the nested pointer's motion goes to + wlserver as touch 0, and in Passthrough (Big Picture's touch mode) a motion for a touch that is not + down moves nothing - so in the app's touchpad mode the Steam client saw no hover and a click landed + wherever the pointer had last been. The motion now always warps the real pointer as well + (`bAlwaysWarpCursor`), which the other touch modes did already. Sixteen more of Armada's patches are DRM/lease/HDR-on-KMS work for a native display, which this app's Wayland-hosted gamescope never reaches, or need a newer gamescope than the runtime has. diff --git a/tools/gamescope/patches/0111-wayland-pointer-warps-in-passthrough.patch b/tools/gamescope/patches/0111-wayland-pointer-warps-in-passthrough.patch new file mode 100644 index 0000000000..466d0a781f --- /dev/null +++ b/tools/gamescope/patches/0111-wayland-pointer-warps-in-passthrough.patch @@ -0,0 +1,16 @@ +diff --git a/src/Backends/WaylandBackend.cpp b/src/Backends/WaylandBackend.cpp +index bf72267..c400978 100644 +--- a/src/Backends/WaylandBackend.cpp ++++ b/src/Backends/WaylandBackend.cpp +@@ -3223,7 +3223,10 @@ namespace gamescope + double flY = ( wl_fixed_to_double( fSurfaceY ) * uScale / 120.0 + oState->nDestY ) / g_nOutputHeight; + + wlserver_lock(); +- wlserver_touchmotion( flX, flY, 0, ++m_uFakeTimestamp ); ++ // Always move the real pointer too: in Passthrough (what Steam's Big Picture asks for) a ++ // touch motion for an id that is not down moves nothing, so hover never reached the ++ // client and a click landed wherever the pointer had last been. ++ wlserver_touchmotion( flX, flY, 0, ++m_uFakeTimestamp, true ); + wlserver_unlock(); + } + void CWaylandInputThread::Wayland_Pointer_Button( wl_pointer *pPointer, uint32_t uSerial, uint32_t uTime, uint32_t uButton, uint32_t uState )