startup: close the rendered session from the output window #2336
Open
SuperCraft3M wants to merge 2 commits from
upstream-pr/2344 into main
pull from: upstream-pr/2344
merge into: R0Y00:main
R0Y00:main
R0Y00:codex/indirect-large-backed-views
R0Y00:codex/word3-preflight-check
R0Y00:codex/vertex-table-two-records
R0Y00:codex/live-index-alias
R0Y00:codex/copied-vertex-buffer-srv
R0Y00:codex/windows-stage-test-output
R0Y00:codex/preserve-live-srv-retirement
R0Y00:codex/share-render-target-tracking
R0Y00:codex/sgd5-negative-offset-fixture
R0Y00:coverage-dashboard
R0Y00:codex/mesh-loose-root
R0Y00:codex/mesh86-cache-padding
R0Y00:codex/xmem-scatter-preflight
R0Y00:codex/mesh-depth-ps
R0Y00:codex/indirect-dispatch-refresh
R0Y00:codex/compute-container-index
R0Y00:codex/startup-compute-formatted-load
R0Y00:codex/compute-indirect-producer
R0Y00:codex/compute-atomic-soffset
R0Y00:codex/mesh-dual-handoff
R0Y00:codex/startup-run-sh-watcher-control
R0Y00:codex/queue31-page-alias
R0Y00:codex/indexed-indirect-compute-root
R0Y00:codex/typed-buffer-view-metadata
R0Y00:codex/translated-indexed-address-alias
R0Y00:codex/fixed-mesh-create-result
R0Y00:codex/xmem-section-lease
R0Y00:codex/startup-slot86-mesh-cache
R0Y00:codex/restore-mesh-barrier-iteration
R0Y00:codex/translated-indirect-upload-index
R0Y00:codex/xapu-completion-opt-in
R0Y00:codex/translated-indexed-rect
R0Y00:codex/translated-indexed-indirect
R0Y00:codex/startup-mesh-lds-integration
R0Y00:codex/startup-console-ms24
R0Y00:codex/startup-slot57-mesh-request
R0Y00:codex/indirect-copy-provenance
R0Y00:codex/present-color-producer-trace
R0Y00:codex/compute-dispatch-binding-trace
R0Y00:codex/translated-indirect-table-buffers
R0Y00:codex/indirect-copy-provenance-base
R0Y00:codex/mix-half-literal-source
R0Y00:codex/translated-indirect-draw
R0Y00:codex/xmem-scatter-diagnostics
R0Y00:codex/slot148-recording-upload
R0Y00:codex/slot70-loading-art-verified
R0Y00:codex/command-list-upload-arena
R0Y00:codex/recover-failed-command-list
R0Y00:codex/startup-heap-timing-notes
R0Y00:codex/align-audio-input-timeline
R0Y00:codex/synthetic-depth-export-control
R0Y00:codex/startup-texture1d-on-windows
R0Y00:codex/1629-packed-position-fixture
R0Y00:codex/cpu-srv-refresh
R0Y00:codex/stream-root-srv-draw
R0Y00:codex/audio-mixer-timer
R0Y00:codex/startup-reload-published-shader
R0Y00:codex/priority-integrate-1284
R0Y00:codex/guest-sixteen-page-record
R0Y00:codex/aot-placed-dxr-batch
R0Y00:codex/guest-directory-selection
R0Y00:codex/gamesave-enumerate-read
R0Y00:codex/readme-archive-to-pixels
R0Y00:codex/pe-placed-view-draw
R0Y00:codex/archive-directory-gpu
R0Y00:codex/slot133-dxr-build
R0Y00:codex/materialize-placed-vertex-view
R0Y00:codex/dstorage-directory-offsets
R0Y00:codex/xg-nine-bc-copy
R0Y00:codex/xg-slot10-bc64-arrays
R0Y00:codex/dxr-guest-address-readback
R0Y00:codex/gpu-va-high-bits
R0Y00:codex/clarify-diagnostic-startup-scope
R0Y00:codex/xg-six-levels
R0Y00:codex/typed-derived-blend
R0Y00:codex/english-legal-text-progress
R0Y00:codex/address-bc-4ks
R0Y00:codex/dstorage-bounded-file-read
R0Y00:codex/wide-srv-offsets-menu
R0Y00:codex/startup-memory-srv
R0Y00:codex/bound-view-tail
R0Y00:codex/language-selector-readback
R0Y00:codex/setup-menu-progress
R0Y00:codex/cpu-plane-refresh
R0Y00:codex/startup-ubyte-vertex
R0Y00:codex/presenter-window-selection
R0Y00:codex/startup-uniform-buffer-lane
R0Y00:codex/intro-loop-timing
R0Y00:codex/static-clzero-loops
R0Y00:codex/document-rtx-intro
R0Y00:codex/startup-insertq
R0Y00:codex/nv12-startup-texture
R0Y00:codex/stream-stage-draw
R0Y00:codex/startup-null-uav-format
R0Y00:codex/startup-draw-capture
R0Y00:codex/shorten-windows-checks
R0Y00:codex/dstorage-rfc1950
R0Y00:codex/startup-dump-fence
R0Y00:codex/pr1135-review-base
R0Y00:codex/startup-stream-requests
R0Y00:codex/startup-chroma-view
R0Y00:codex/readme-graphics-pipeline-streams
R0Y00:codex/static-crt-free-tls
R0Y00:codex/arc-140t-rtx-5080-laptop-gpu-reports
R0Y00:codex/main-startup-progress-entry
R0Y00:codex/signed-dxil-catalogue
R0Y00:codex/reloc-free-preferred-base
R0Y00:codex/quad-dpp-bit-mask
R0Y00:codex/raw-srv-bounds
R0Y00:codex/rx9070-31044-hardware-report
R0Y00:codex/gpu-page-source-provenance
R0Y00:codex/runtime-placeholder-interior
R0Y00:codex/gpu-copy-queue-tile-order
R0Y00:codex/pe-pin-external-providers
R0Y00:codex/xmem-placeholder-reservations
R0Y00:codex/xmem-shared-physical-pages
R0Y00:codex/pe-package-startup
R0Y00:codex/xmem-tools-memory-query
R0Y00:codex/cpu-stack-output-import
R0Y00:codex/pe-load-security-cookie
R0Y00:codex/record-three-bvh-retests
R0Y00:codex/cpu-rbp-frame-anchor
R0Y00:codex/xmem-default-startup
R0Y00:codex/record-rtx-3050-ti-9597
R0Y00:codex/docs-readme-start-here
R0Y00:codex/check-compute-mad24-truncation
R0Y00:codex/docs-discord-community
R0Y00:codex/bound-rcx-branch-mutants
R0Y00:codex/rtx5060ti-bvh-62114
R0Y00:codex/837-neutral-readme-disclaimer
R0Y00:codex/record-rtx-3070-ti
R0Y00:codex/title-neutral-public-wording
R0Y00:codex/exe-shadow-frame-submissions
R0Y00:codex/exe-shadow-runtime-chain
R0Y00:codex/readme-polish
R0Y00:codex/gpu-coverage-nov23
R0Y00:codex/spirv-minlod
R0Y00:codex/shadow-shim-device
R0Y00:codex/exe-two-shadow-frames
R0Y00:codex/shim-dispatch-cleanup
R0Y00:codex/fix-spirv-cache-probe
R0Y00:codex/sampler-use
R0Y00:codex/ballot-bit-extract
R0Y00:codex/packed-fma-release
R0Y00:codex/cpu-packed-fma-o2
R0Y00:codex/publish-coverage-dashboard
R0Y00:codex/mesh-cbv-binding-order
R0Y00:codex/spirv-window-fixture
R0Y00:codex/ps-e32-float-uint
R0Y00:codex/ps-cbuffer-reads
R0Y00:codex/fixed-profile-rescan
R0Y00:codex/shim-compute-integration
R0Y00:codex/readme-visible-coverage
R0Y00:codex/readme-research-navigation
R0Y00:codex/integrate-pr-256
R0Y00:codex/indexed-mesh
R0Y00:codex/sampled-coverage
R0Y00:codex/first-ms
R0Y00:codex/dual-ps
R0Y00:codex/ps-attribute
R0Y00:codex/compute-first
R0Y00:codex/ps-export
R0Y00:codex/readme-research-status
R0Y00:codex/ps-layout
R0Y00:codex/blast-window
R0Y00:codex/chart-caption
R0Y00:codex/reviewer-roles
R0Y00:codex/blast-aot
R0Y00:codex/archive-program
R0Y00:codex/crc-stream-program
R0Y00:codex/exe-image-data-chain
R0Y00:codex/local-cpu-fixture-coverage
R0Y00:codex/exe-bound-frame-chain
R0Y00:codex/exe-mapped-comparison
R0Y00:codex/contribution-dependencies
R0Y00:codex/exe-entry-aot
R0Y00:codex/bink-frame-heap-integration
R0Y00:docs/hardware-seven-reports
R0Y00:codex/bink-custom-heap
R0Y00:codex/bink-heap-callers
R0Y00:codex/discussions-entry-points
R0Y00:codex/gpu-community-batch-64
R0Y00:codex/ffx-scratch-writers
R0Y00:codex/generic-project-documentation
R0Y00:codex/ffx-dispatch-rcas
R0Y00:codex/four-windows-gpu-reports
R0Y00:codex/title-neutral-project-wording
R0Y00:codex/community-coverage-provenance
R0Y00:codex/rcas-packed-texels
R0Y00:codex/community-gpu-retests
R0Y00:codex/community-build-and-gpu-reports
R0Y00:codex/ffx-provider-loop
R0Y00:codex/ffx-recurrent-views
R0Y00:codex/ffx-recurrent-resource
R0Y00:codex/amd-wave64-reports
R0Y00:codex/ffx-backend-slots
R0Y00:codex/upscaler-device-init
R0Y00:codex/ffx-context-lifecycle
R0Y00:codex/ffx-version-query
R0Y00:codex/ffx-provider-contract
R0Y00:codex/typed-object-callback
R0Y00:codex/cpu-ordinal-import
R0Y00:codex/chained-cpu-ranges
R0Y00:codex/cpu-import-call
R0Y00:codex/cpu-direct-call
R0Y00:codex/cpu-leaf-aot
R0Y00:codex/community-project-status
R0Y00:codex/script-state-path-replay
R0Y00:codex/script-state-evidence
R0Y00:codex/bc7-resident-tail
R0Y00:codex/bcpack-mip-tail
R0Y00:codex/bc7-texture-draw
R0Y00:codex/asset-ranges
R0Y00:codex/pixel-constants
R0Y00:codex/pixel-aot
R0Y00:codex/pre-exe-workloads
R0Y00:codex/root-signature-device-coverage
R0Y00:engineering/packed-bvh-leaves
R0Y00:engineering/bvh-build-and-update
R0Y00:engineering/intake-root-roundtrip
R0Y00:community/gpu-check-release
R0Y00:community/english-contributor-entry
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
R0Y00/Xbox2Windows!2336
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2344"
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 R0Y00/Xbox2Windows. Originally posted by SuperCraft3M on 2026-11-25T13:03:21Z.
Change
Closing the output window of a rendered
run.ps1session signals its debugger. The debugger owns the Windows job, terminates the child and verifies that the process handle becomes signaled before returning. Minimize keeps the session active. In a direct shim host, Close hides the output and the host remains active.The source-built presenter exercises minimize, restore and Close in both modes. The managed probe requires a debugger return and a zero child exit. The direct probe verifies that the window is hidden and the host can continue issuing presents.
Verification
Changes at
0465ba6don18f2f85c. Release, MSVC 19.44.35230, Windows 11 build 26300.9711. Hardware used an NVIDIA RTX 4070 with driver 32.0.16.2114. The D3D12 debug layer was unavailable.4 passed, 0 failed, 0 skipped. The launcher check ran on Windows PowerShell 5.1 and PowerShell 7.
AI-assisted (Codex).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:05:47Z.
Review: COMMENTED
Review of head
5633a0d3f2b75f32ffcfb7a536d502d0f05fe9f5(Linux host; no PowerShell, no Windows).Commands executed locally (in a worktree of the PR head):
CI at review time: Windows and Linux jobs still pending. The PR is mergeable.
Findings: P1=0, P2=0.
Read-through:
run.ps1:-not $env:X2W_HIDE_TITLE_WINDOWtreats the string "0" as set (non-empty string is truthy), so an explicit0still opts out. The new test case with-Render -LiveConsoleandhide_env="0"covers that.--console 0matchesdebug_launch.py(opts.get("--console", "1") == "1").d3d12_present.inl:WM_CLOSEnow callsExitProcess(0)after logging. Minimize is unaffected because it goes throughWM_SYSCOMMAND. Nit: the exit skips any flush of the shader cache or logs, which the PR text already says is intended.startup_present_producer.cpp(window-close): the fixture finds the output window by class and PID, checks that the guest window is hidden, then minimize, restore andSC_CLOSE. Reaching the 5 s sleep and returning 19 means the process did not exit, so the test fails closed.startup_output_window_closeruns with the new CMake line, which linksuser32and adds thesrcinclude path.startup_run_ps1_check.py: the expectations (--console 0unless-LiveConsole, and the inherited env value) matchrun.ps1.Nits:
-Translatepath only gets the--console 0and hide default through$Render. That is correct, since-Translateneeds-Render. The test'srendering = translate or ...is a slightly looser model than the script, but it is harmless.Not done:
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T13:16:18Z.
Review: CHANGES_REQUESTED
The presenter is inside the shared D3D12 shim. WM_CLOSE currently calls ExitProcess in every host that creates that window, including hosts launched without run.ps1. That also runs DLL detach after stopping the other threads, which can hang if a stopped thread holds a lock needed by detach. Keep session shutdown owned by the launcher or an explicitly enabled session owner. In other hosts, closing the presenter should leave the host alive.
Please keep the existing minimize check and add both close cases: a managed source-built child whose process handle becomes signaled and whose launcher returns, and a direct shim host that stays alive on presenter close. The window visibility and live-console change can proceed independently if you want to land that first. Microsoft ExitProcess documentation
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-25T16:06:44Z.
APPROVED. Closes rendered session from the output window.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T01:01:24Z.
I merged
main38129ba3into this branch as44f14769(a merge commit on top of0465ba6d; no rebase and no force-push). It also merges cleanly with the currentmain86beae95.Conflicts and how I resolved them.
src/startup_stubs/d3d12_present.inl: I keptmain's plane-surfacepresent_to_windowand added this branch'soutput_closedcheck to its early return:if (p.failed || !queue || !steps || !count || !plane_surfaces || InterlockedCompareExchange(&output_closed, 0, 0)) return false;tests/startup_run_ps1_check.py: I kept this branch's--managed-windowexpectation andmain's longer debugger record.main's native-shader case also runs with-Render, so the condition is nowif "-Render" in switches or translate or native:.tools/startup/debug_launch.py: I keptmain'sgrab_window/capture_windowsplit and capture-thread shutdown. The final capture keeps this branch's condition,if exit_code is None and not window_close:.tools/startup/run.ps1: both argument lists are passed,@traceArgs @captureArgs @windowArgs.What I ran. I built the whole tree in
devandrelease, then ran (under the shared GPU lock,-j 1):/O2.startup_run_shreports a capability skip (77), as on every Windows host.startup_run_ps1failed on my first resolution of its check, because an assignment was mis-indented. I fixed that before committing. On44f14769it reports0 failedwith bothpowershellandpwsh.git diff --check origin/main...HEADis clean.This needs a review from someone other than me before it can be merged.
Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Python 3.12.10.
This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T02:31:24Z.
Review: APPROVED
Reviewed
44f14769(0465ba6dplus a merge ofmain) trial-merged over currentmain7364e6a9. The merge is clean andgit diff --cached --checkis clean.R0Y00's request on
5633a0d3.0465ba6danswers all three points:WM_CLOSEcalls neitherExitProcessnorShowWindow(SW_MINIMIZE). IfX2W_SESSION_CLOSE_EVENTnames an event it can open and set, it returns, and the launcher ends the run. Otherwise it hides the output window, stops the hide-title timer, shows any hidden title windows again, and setsoutput_closedsopresent_to_windowrefuses from then on. The host keeps running.debug_launch.py --managed-window 1creates a randomLocal\X2W-session-close-<uuid>event and passes its name only to its child; an inherited value is dropped first. When the event is set, the launcher callsTerminateJobObject(job, 0), which skips the DLL detach R0Y00 pointed at. It then keeps reading debug events for up to 10 s, untilEXIT_PROCESS. It returns 2 if the process handle hasn't signalled within 2 s.run.ps1passes--managed-window 1only with-Render.-Translateand-NativeShadersboth need-Render.window-closeinstartup_present_producerminimizes, restores and closes the window, then checks the direct host survives and the managed child is ended. The existing minimize check is kept.The merge of
main(44f14769, three files):d3d12_present.inl:present_to_windowkeepsmain's plane-steps signature and adds theoutput_closedcheck. That's right.startup_run_ps1_check.py: the condition becomes"-Render" in switches or translate or native. Theor nativepart is needed: the native case passes-Render -NativeShadersinsiderun_case, not throughswitches. The tuple keepsmain's fields.debug_launch.py:mainmovedcapture_windowout of this spot. The merge keepsmain's version and adds this PR'sand not window_closeguard.What I ran. I did a full build in
devandrelease, then ran_hardware: 21 of 21 pass in each preset, includingstartup_output_window_closeandstartup_run_ps1._hardware:startup_present_producer_hardwareandstartup_present_view_hardwarepass in each preset.dev,-j 6 -E '(_hardware$|startup_audio_)'): 1977 of 1980 pass. The other three arestartup_inflate,shader_sgd5_effects_cli_checkandpixel_aot_comparisons_warp. All three timed out under load and pass when rerun alone with-j 1.Mutants. For each, I rebuilt
devwhere needed and ranstartup_output_window_close,startup_run_ps1andstartup_present_producer_warp:startup_output_window_close)startup_output_window_close)startup_output_window_close)TerminateJobObjectexit 0x00000000inevents.txt)run.ps1never passes--managed-windowstartup_run_ps1)present_to_windowignoresoutput_closedtitle_hider.stepremoved)X2W_SESSION_CLOSE_EVENTnot droppedRestored and rebuilt afterwards;
git diff --quietis clean.Non-blocking.
present_to_windowrefuses, soshown_in_windowis false. The title windows the hider hid come back, and every sixth frame doesread_back_presentedanddraw_overlayinto them. That's a reasonable way to keep a direct host visible, but no test pins it, and the docs line says only "Close hides the output". A direct-mode check that a present after Close doesn't reach the output window, and that a hidden title window is shown again, would pin the first two survivors.startup_output_window_closesetsSKIP_RETURN_CODE 77, but nothing in it returns 77. That's harmless, but it may mislead a reader.Verdict: approve on
44f14769. R0Y00's changes request on5633a0d3still stands, so this needs R0Y00's re-review before it can merge.Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088; D3D12 WARP; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; debug layer on for the hardware runs.
CI:
Build and test on Windows,Assemble and translate gfx1013 fixturesandRun platform-independent Python checks on Linuxpass on44f14769.This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T02:50:01Z.
I verified the earlier close handling feedback with
44f14769integrated over main4d7265c0(local tree b4db0b8895ee06c4109f4c2b1ecffa9af90813f5). The only conflict is in tools/startup/run.ps1. Keep #2867's scoped Continue and script:debuggerExit capture, and append @windowArgs to the debugger call inside that scope. The existing -Render guard and managed-window argument stay.Release /O2: all four checks passed with no skips. The synthetic managed presenter exits through the debugger, the direct presenter hides and keeps the host alive, and minimize/restore still works. The launcher fixture passed in Windows PowerShell 5.1 and PowerShell 7, including stderr status handling and the managed flag.
Windows 11 26200.9974, inbox WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. Please merge current main into this PR and retain both launcher behaviors. I can then recheck and update my earlier review on the published head.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-28T08:10:34Z.
Thanks for the close-handling rework. I reviewed head
44f14769against currentmain(1f07b2c1). The code answers R0Y00's changes request on5633a0d3(grep -c ExitProcess src/startup_stubs/d3d12_present.inl→0), but one thing still blocks the merge:mainand resolvetools/startup/run.ps1as R0Y00 asked at 02:50Z.git merge-tree --write-tree 1f07b2c1 44f14769exits 1 withCONFLICT (content): Merge conflict in tools/startup/run.ps1. Keep #2867's scoped& { $ErrorActionPreference = "Continue" ... $script:debuggerExit }block and append@windowArgsafter@captureArgsinside it. Please merge rather than rebase. On a scratch resolution done that way,startup_run_ps1_check.py(text-only on Linux),docs_links_check.pyandbidi_controls_check.pypass. R0Y00 then needs to re-review, because the changes request still stands.Also worth fixing:
prtest preset's regex matches none ofstartup_output_window_close,startup_run_ps1orstartup_present_producer_warp, andgrep -c startup_output_window_closeon the Windows job log →0. On Linux, a mutant that drops@windowArgsfromrun.ps1still passesstartup_run_ps1_check.py(0 failed (text only: not a Windows host)). That is the conflicted line, so please post Windowsstartup_run_ps1(powershell and pwsh) andstartup_output_window_closeruns on the new head.present(), isok(call(queue, 32, ...)) && finish(), which observes the queue fence and not the window. That leaves three of pigalot's surviving mutants unpinned:present_to_windowignoresoutput_closed,title_hider.stepremoved, and the hide-title timer kept. Asserting that the output window gets no new frame after Close, and that a hidden title window is shown again, would pin them.process did not signal exitpath (return 2) can't be reached with the test child, so please say in a comment or the PR text that it is only a safeguard.SKIP_RETURN_CODE 77is set, but the check never returns 77 (grep -c 77→0).--managed-windowandX2W_SESSION_CLOSE_EVENTappear in neitherdebug_launch.py's docstring nordocs/(0and0). Dropping an inheritedX2W_SESSION_CLOSE_EVENTis pinned only by the test's ownenv.pop; a case that sets a stale name before launch would pin it.Environment: Linux, static review of git objects,
git merge-tree, a scratch merge (never pushed) and the CI job logs. I did no Windows, WARP or GPU run.This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T13:11:04Z.
The head is still
44f14769, so my 11-28 comment stands and I haven't re-reviewed it in depth. Since thenmainhas moved further, and the conflict has grown. Againstmainc04e0dd6,git merge-tree --write-tree c04e0dd6 44f14769exits 1 in two files:tools/startup/run.ps1, two hunks. First, keepmain's$mapArgssetup (#1251) and add your$windowArgslines after it. Second, keepmain's scoped& { $ErrorActionPreference = "Continue" ... $script:debuggerExit = $LASTEXITCODE } *> "$LogDir.out"block, with--assert-sites $AssertSites @mapArgs @traceArgs @captureArgs @holdArgs(#2867, #2916 and the hook-thread hold), and append@windowArgsto it.tests/startup_run_ps1_check.py, one hunk. Keepmain'snative_default = (native or "-Render" in switches) and not translateline from #3449, and add your--managed-window 1expectation after it.expectedstill usesnative_defaulton both sides.Since #3449,
-Renderruns default to native shaders. Your--managed-window 1sits under-Rendertoo, so every default rendered launcher run gets the managed close. Please rebase (or mergemain, as R0Y00 asked). Then post Windowsstartup_run_ps1(powershell and pwsh) andstartup_output_window_closeruns on the new head, and R0Y00 can re-review.Environment: Linux only: git objects and
git merge-tree. I did no Windows run.This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T09:35:56Z.
I trial-merged
44f14769over maind2e6a4edand tested the four-file conflict resolution locally. In present_to_window, keep the current failed-present diagnostic and return separately when output_closed is set. In the producer fixture, retain both main's color readback flags and the new close_test flag. In the launcher, keep mapArgs, holdArgs and the PowerShell 5.1 stderr scope, then append windowArgs to the same invocation. In the launcher fixture, keep native_default and the managed-window argument assertion.MSVC Debug on Windows build 26300, inbox WARP, debug layer enabled: ctest --preset dev --no-tests=error -j 1 --output-on-failure -R '^(startup_output_window_close|startup_present_producer_warp|startup_run_ps1)$' passed 3/3 without skips. The launcher self-test exercised both powershell and pwsh.
I also exercised the inherited-event control raised on #3342. Start debug_launch.py without --managed-window, set X2W_SESSION_CLOSE_EVENT to a real initially unsignaled parent event, and let the existing producer fixture minimize, restore and close. With the merged code the child exited 0 and the event stayed unsignaled. Removing env.pop("X2W_SESSION_CLOSE_EVENT", None) made the child exit 21 and signal that event. Please include that unmanaged case when updating this original branch. #3342 carries the same implementation, so the runtime review can stay here.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.