Lifecycle: a WM_CLOSE to the window ends the title, as the close button does (#726) #753
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T04:58:40Z.
Fixes 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.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-28T05:13:13Z.
Review: APPROVED
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).