Ignore held mouse buttons when F1 regains focus #4977

Open
github-bot wants to merge 4 commits from github-bot/gh-4976 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 16:10 UTC · original
andrewpozdnakov7-jpg:codex2/fix/f1-main-menu-mouse → main · +7 −2 · 1 files · 4 commits · open

Refs #4940, point 1.

What it changes

The new main already restores hover, clicks and Back in the settings menu and its save picker. This update carries across the held-button guard from this PR. F1 waits for a release before acting on a mouse button that was already down when the menu opened or the game regained focus. A fresh press after release works normally.

How it was tested

  • A focused Windows Rust fixture ran the exact foreground polling and press logic with synthetic button and focus states.

  • Before (93aa9a92): both a held left click and a held right click became a menu press on focus return. The menu-open and arrow-key controls passed.

  • After (9159c9d6): all four scenarios passed. Both buttons stayed suppressed until release, and ordinary pointer and arrow input still worked.

  • Windows cargo check --locked -p victory-gpu and staged asset policy for the one changed file passed. Actual in-game focus and click behavior still needs a menu tester.

  • CI check stops at Clippy findings in the unchanged victory-shader files lds_batch.rs and oracle64.rs.

Checked for overlap

  • Checked the new main menu and the prior pointer PRs. Main supplies pointer layout and picker navigation. This diff covers the existing held-button safeguard within that layout.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding this change into another commit.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 16:10 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4976) `andrewpozdnakov7-jpg:codex2/fix/f1-main-menu-mouse` → `main` · +7 −2 · 1 files · 4 commits · open Refs #4940, point 1. ## What it changes The new `main` already restores hover, clicks and Back in the settings menu and its save picker. This update carries across the held-button guard from this PR. F1 waits for a release before acting on a mouse button that was already down when the menu opened or the game regained focus. A fresh press after release works normally. ## How it was tested - A focused Windows Rust fixture ran the exact foreground polling and press logic with synthetic button and focus states. - Before (`93aa9a92`): both a held left click and a held right click became a menu press on focus return. The menu-open and arrow-key controls passed. - After (`9159c9d6`): all four scenarios passed. Both buttons stayed suppressed until release, and ordinary pointer and arrow input still worked. - Windows `cargo check --locked -p victory-gpu` and staged asset policy for the one changed file passed. Actual in-game focus and click behavior still needs a menu tester. - [CI check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46716224155/job/142888912758) stops at Clippy findings in the unchanged `victory-shader` files `lds_batch.rs` and `oracle64.rs`. ## Checked for overlap - [x] Checked the new main menu and the prior pointer PRs. Main supplies pointer layout and picker navigation. This diff covers the existing held-button safeguard within that layout. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this change into another commit. AI-assisted with OpenAI Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 16:12:28 +00:00
github-bot changed title from Restore mouse controls in the main F1 menu to Restore mouse controls in F1 and the save picker 2026-12-01 16:35:03 +00:00
Place the pointer state and its reset outside the overlay failure changes in #5039 so both fixes can be merged in either order.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 18:03 UTC · original

499609f5 moves the pointer state and its per-draw reset away from the overlay's allocation failure flag. The current heads of this PR and #5040 now merge cleanly together. The merged code clears the pointer layout before the retry check and rebuilds it from the drawn rows once buffers are available.

The focused Windows geometry fixture and cargo check --locked -p victory-gpu passed on the updated head. Staged asset policy checked the one changed file. Actual in-game mouse interaction still needs a menu tester.

Please keep the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding this change into another commit.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 18:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4976#issuecomment-7320331363) [499609f5](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/4977/commits/499609f50a5091cf77f8291ae2fc860010048b36) moves the pointer state and its per-draw reset away from the overlay's allocation failure flag. The current heads of this PR and #5040 now merge cleanly together. The merged code clears the pointer layout before the retry check and rebuilds it from the drawn rows once buffers are available. The focused Windows geometry fixture and `cargo check --locked -p victory-gpu` passed on the updated head. Staged asset policy checked the one changed file. Actual in-game mouse interaction still needs a menu tester. Please keep the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this change into another commit. AI-assisted with OpenAI Codex.
github-bot changed title from Restore mouse controls in F1 and the save picker to Ignore held mouse buttons when F1 regains focus 2026-12-01 18:36:46 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 18:33 UTC · original

Updated this PR to 9159c9d6 on the current main. Main now supplies the pointer navigation and picker UI. The remaining diff preserves the held-button guard. The exact press-path fixture reproduced accidental left and right presses on focus return on 93aa9a92; both stopped with the patch, and normal clicks and an arrow press still worked. Windows crate check and staged asset policy passed.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 18:33 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4976#issuecomment-7321145070) Updated this PR to `9159c9d6` on the current `main`. Main now supplies the pointer navigation and picker UI. The remaining diff preserves the held-button guard. The exact press-path fixture reproduced accidental left and right presses on focus return on `93aa9a92`; both stopped with the patch, and normal clicks and an arrow press still worked. Windows crate check and staged asset policy passed.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4977/head:github-bot/gh-4976'
git switch 'github-bot/gh-4976'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4976'
git switch 'github-bot/gh-4976'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4976'
git switch 'github-bot/gh-4976'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4976'
git switch 'main'
git merge --squash 'github-bot/gh-4976'
git switch 'main'
git merge --ff-only 'github-bot/gh-4976'
git switch 'main'
git merge 'github-bot/gh-4976'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

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