Keep window moves and F1 menu motion out of captured mouse input #591

Open
ghptc wants to merge 1 commit from upstream-pr/591 into main
ghptc commented 2026-11-28 01:27:16 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ghptc on 2026-11-28T01:27:16Z.


Capture can reclaim the pointer during a Win32 window move or after the title loses keyboard focus. Motion made inside F1 can also leak into the first guest reading after the menu closes. On a4d05e7, moving 20 pixels inside F1 changed that reading from 13 to 33.

Release confinement for the native move/resize loop, and reacquire it when the foreground title regains focus. Only accumulate motion sampled within one uninterrupted gameplay interval. The F1 label describes cursor confinement. The README documents the existing keyboard mapping.

Verification

  • A synthetic window fixture reproduced the modal-loop and focus failures on upstream. With the patch, capture stays released through the loop and after focus loss. The F1 reading stays at 13, then resumes on the next clean interval.
  • On an isolated Proton Experimental desktop, all eight combinations of fullscreen, capture and warp passed, as did host-driven Alt-Tab in windowed and fullscreen modes. Pointer reports at 125, 500 and 1000 Hz were synthetic.
  • The targeted GameInput, lifecycle and menu suites had 41 passes. Default and diagnostics MSVC cross-target checks passed. The Linux-native HLE build encountered the same 37 graphics compilation errors on upstream and the patch.
  • Native Windows, physical-device timing and retail gameplay were not run for this patch. The committed foreground fixture is opt-in and moves the desktop pointer.

Refs #489. The gameplay camera mapping requested there is tracked in #142, #482 and #581. This change addresses capture transitions. It extends the merged F1 suppression in #32. The author of the closed #551 separately reported native Windows drag interference.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5535361892 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/591). Originally posted by [ghptc](https://github.com/ghptc) on 2026-11-28T01:27:16Z. --- Capture can reclaim the pointer during a Win32 window move or after the title loses keyboard focus. Motion made inside F1 can also leak into the first guest reading after the menu closes. On `a4d05e7`, moving 20 pixels inside F1 changed that reading from 13 to 33. Release confinement for the native move/resize loop, and reacquire it when the foreground title regains focus. Only accumulate motion sampled within one uninterrupted gameplay interval. The F1 label describes cursor confinement. The README documents the existing keyboard mapping. ### Verification - A synthetic window fixture reproduced the modal-loop and focus failures on upstream. With the patch, capture stays released through the loop and after focus loss. The F1 reading stays at 13, then resumes on the next clean interval. - On an isolated Proton Experimental desktop, all eight combinations of fullscreen, capture and warp passed, as did host-driven Alt-Tab in windowed and fullscreen modes. Pointer reports at 125, 500 and 1000 Hz were synthetic. - The targeted GameInput, lifecycle and menu suites had 41 passes. Default and diagnostics MSVC cross-target checks passed. The Linux-native HLE build encountered the same 37 graphics compilation errors on upstream and the patch. - Native Windows, physical-device timing and retail gameplay were not run for this patch. The committed foreground fixture is opt-in and moves the desktop pointer. Refs #489. The gameplay camera mapping requested there is tracked in #142, #482 and #581. This change addresses capture transitions. It extends the merged F1 suppression in #32. The author of the closed #551 separately reported native Windows drag interference.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/591:upstream-pr/591'
git switch 'upstream-pr/591'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/591'
git switch 'upstream-pr/591'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/591'
git switch 'upstream-pr/591'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/591'
git switch 'main'
git merge --squash 'upstream-pr/591'
git switch 'main'
git merge --ff-only 'upstream-pr/591'
git switch 'main'
git merge 'upstream-pr/591'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!591
No description provided.