Repository navigation
fix(menu): keep the mouse free after Escape then F1 - #2035
Merged
Merged
Conversation
Arkex-ai
force-pushed
the
fix/escape-mouse-capture
branch
from
November 11, 2026 00:55
51ec562 to
e6a13b7
Compare
Assisted-by: GPT-6 (Codex)
Arkex-ai
force-pushed
the
fix/escape-mouse-capture
branch
from
November 11, 2026 01:19
e6a13b7 to
1519603
Compare
Arkex-ai
marked this pull request as ready for review
November 11, 2026 01:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With the default menu shortcut, Esc releases the mouse. Opening and closing the menu with F1 later could grab it again. F1 now restores capture only if the mouse was captured when F1 opened the menu. The opt-in Esc shortcut still restores the capture it released.
Closes #2031.
Technical changes
Validation
At
1519603dond47206ed, the pointer fixture passed on Windows LLVM and Ubuntu Clang 18. It checks default Esc then F1, opt-in Esc, and F1 while captured on both host paths.The Windows shortcut suite and all 18 window-procedure cases in the screensaver fixture passed. The first hosted Windows run found a stale two-argument test stub for the updated menu handler. The stub now matches the handler.
On the first revision, two negative controls independently reproduced stale recapture in the Windows and SDL host paths. In a Windows Kokiri smoke test at
600960cd, the default Esc-then-F1 sequence, direct F1, and opt-in Esc opening returned to gameplay. The run exited normally and preserved the original checkpoint hashes. Cursor confinement was asserted in the fixtures; the native run verified the menu transitions.Both hosted Windows source shards pass at this head. Main includes the startup fixture fix from test(display): the startup fixture stubs driver_cache_room (main is red since #2033) #2051.