diff --git a/tools/gamescope/patches/0142-corner-reset-hides-the-centre.patch b/tools/gamescope/patches/0142-corner-reset-hides-the-centre.patch new file mode 100644 index 0000000000..a2b74172cb --- /dev/null +++ b/tools/gamescope/patches/0142-corner-reset-hides-the-centre.patch @@ -0,0 +1,14 @@ +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -5818,7 +5818,9 @@ + if ( pFocus->inputFocusWindow->GetFocus()->bResetToCorner ) + { + wlserver_lock(); +- wlserver_mousewarp( pFocus->inputFocusWindow->GetGeometry().nWidth / 2, pFocus->inputFocusWindow->GetGeometry().nHeight / 2, 0, true ); ++ // Only the corner reaches the client: a page that loads during this reset keeps the centre as its hover. ++ wlserver.mouse_surface_cursorx = pFocus->inputFocusWindow->GetGeometry().nWidth / 2; ++ wlserver.mouse_surface_cursory = pFocus->inputFocusWindow->GetGeometry().nHeight / 2; + wlserver_fake_mouse_pos( pFocus->inputFocusWindow->GetGeometry().nWidth - 1, pFocus->inputFocusWindow->GetGeometry().nHeight - 1 ); + wlserver_unlock(); + }