diff options
| author | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-24 03:00:33 -0300 |
|---|---|---|
| committer | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-24 03:00:33 -0300 |
| commit | a02134a9c60af52b8e0c6bdc6e2fa2bad72e7e75 (patch) | |
| tree | 0b31d146a504bcb5a0e6e44c5f0794b0cd8ae26b /runtime/src/pe_loader.cpp | |
| parent | 82dcf6dedc56bddc189b455f6498e679ecbb4fd6 (diff) | |
lifecycle: hook only the title window, end through ExitProcess, fix unregister race
- Only the title's first top-level window (no parent, not WS_CHILD, not
WS_EX_TOOLWINDOW) is fitted to the work area and gets the SC_CLOSE hook;
WM_NCDESTROY releases the claim. Other windows the title creates are left
alone instead of ending the process on close.
- The suspend thread and the 1 s deadline end the run through the title's own
ExitProcess shim (process.cpp end_run), so the host finishes its cleanup,
instead of TerminateProcess.
- Suspend callbacks run under the (now recursive) registration lock and each
id is looked up again before its call, so a routine never runs after
UnregisterAppStateChangeNotification returned, and an unregister from inside
a callback works.
- docs/runtime_imports.md: speech, XLauncher and XAppCapture text matches the
code; new lifecycle shim paragraph.
- lifecycle_test: unregister-from-callback and title-window claim checks.
AI-assisted. Tested: lifecycle_test (29 checks), xgameruntime_offline_test
(69 checks), docs and gdk_runtime_calls pytest; clang 23 / mingw x64.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions