Lifecycle: a WM_CLOSE to the window ends the title, as the close button does (#726) #753
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!753
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-753"
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?
@kibagami-nc on GitHub · 2026-11-28 04:58 UTC · original
kibagami-nc:fix/wm-close-ends-the-title→main· +36 −4 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCFixes finding 1 of #726's test report.
What happens
The layer ends the title only on the user's close:
WM_SYSCOMMANDwithSC_CLOSE, from the close button, Alt+F4, or the window or taskbar menu.A plain
WM_CLOSEfrom another program goes on to the title's own procedure instead. Such programs includeProcess.CloseMainWindow,taskkillwithout/F, and launcher scripts. The procedure destroys the window, but the title keeps presenting to it and the process never ends. Until the process is killed, Streamline logsgetRefreshRate ... Window handle ... is not a valid windowat every present (#726).The change
close_requestsays which messages ask the window to close:SC_CLOSE, as before;WM_CLOSEto the top-level window.window_procends the title for both through the sameend_title(suspend, then end).window closed (WM_CLOSE)for the second, so the two can be told apart.WM_CLOSEis passed on to the title as before.Tests
modules::lifecycle::tests::closes_asked_of_the_window_end_the_title:SC_CLOSE(also with the system's low bits set) and a top-levelWM_CLOSE;WM_CLOSE,SC_KEYMENU,SC_MINIMIZE,SC_MAXIMIZE,WM_DESTROY,WM_NCDESTROYandWM_SIZE;WM_CLOSEarm.WM_CLOSEthrough the window procedure itself, since ending the title ends the process.cargo test -p victory-hle --lib --locked: 189 passed.--all-features) reports nothing inlifecycle.rs; main's own lints are in #665.Not run in the game here.
@Dukestar69 on GitHub · 2026-11-28 05:13 UTC · original · approved these changes
LGTM — verified on Windows:
cargo test -p victory-hle --lib lifecyclepassed (12/12, includingcloses_asked_of_the_window_end_the_title)cargo xtask policypassed (294 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).