Add F11 fullscreen toggle #1067
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1067
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1067"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@erax4193 on GitHub · 2026-11-28 12:38 UTC · original
erax4193:f11-fullscreen-toggle→main· +66 −5 · 2 files · 2 commits · openSummary
VICTORY_FULLSCREEN=1, pressing F11 restores to the original windowed position(F11)as a shortcut hintHow it works
The title's window procedure (
window_procinlifecycle.rs) interceptsWM_KEYDOWN/WM_SYSKEYDOWNforVK_F11on the top-level window and callstoggle_on_f11().A static
BEFORE_F11: Mutex<Option<[i32; 6]>>stores[left, top, right, bottom, GWL_STYLE, GWL_EXSTYLE]before going fullscreen.fullscreen()(the startup path viaVICTORY_FULLSCREEN=1) also writes this state so the toggle always has something to restore to.Closes #1063
Test plan
VICTORY_FULLSCREEN=1→ press F11 → window goes windowed → press F11 → back to fullscreenevery_line_fits_and_every_character_has_a_picturetest still passes (label is 27 chars, all characters have bitmaps)CreateWindowExWfullscreen test still passes🤖 Generated with Claude Code
@ANDREANIADS on GitHub · 2026-11-28 20:12 UTC · original
On
fe2ac5b, holding F11 can call the fullscreen toggle more than once per physical press. I exercised the PR’s dispatch block with syntheticWM_KEYDOWNandWM_SYSKEYDOWN: press, autorepeat (lParam bit 30 set), release, press again produced three toggle callbacks for each message type. Guarding onlytoggle_on_f11(hwnd)withif lparam & (1 << 30) == 0reduced that to two. The repeat was still consumed, while key-up and an unrelated key were forwarded. This was a Linux CPU test of the handler with a callback stand-in. Native window transitions still need a Windows check.@erax4193 on GitHub · 2026-11-29 09:49 UTC · original
Thanks for catching that — added
lparam & (1 << 30) == 0guard in38751f5so auto-repeat keydowns are skipped. BothWM_KEYDOWNandWM_SYSKEYDOWNnow fire the toggle only on the initial press.github-bot referenced this pull request2026-11-29 16:27:02 +00:00
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.