prevent flickering windows on Windows by adding DETACHED_PROCESS#11926
prevent flickering windows on Windows by adding DETACHED_PROCESS#11926acarl005 wants to merge 1 commit into
Conversation
…m::Threading::DETACHED_PROCESS
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds DETACHED_PROCESS to the Windows async command wrapper so background console-subsystem processes are started without inheriting Warp's console attachment, while preserving the existing job breakaway behavior.
Concerns
- No blocking correctness, security, or spec-alignment concerns found.
- One suggestion notes that
CREATE_NO_WINDOWis ignored whenDETACHED_PROCESSis present, so the effective flag set can be made clearer.
Verdict
Found: 0 critical, 0 important, 1 suggestions
Approve with nits
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| let flags = Threading::CREATE_NO_WINDOW.0 | ||
| | Threading::DETACHED_PROCESS.0 | ||
| | Threading::CREATE_BREAKAWAY_FROM_JOB.0; |
There was a problem hiding this comment.
💡 [SUGGESTION] DETACHED_PROCESS causes Windows to ignore CREATE_NO_WINDOW, so keeping both makes the effective console behavior harder to reason about.
| let flags = Threading::CREATE_NO_WINDOW.0 | |
| | Threading::DETACHED_PROCESS.0 | |
| | Threading::CREATE_BREAKAWAY_FROM_JOB.0; | |
| let flags = Threading::DETACHED_PROCESS.0 | |
| | Threading::CREATE_BREAKAWAY_FROM_JOB.0; |
Description
With Warp on Windows running, sometimes random console windows flicker into view. Very annoying. This PR fixes that.
Recording.2026-05-02.203454.mp4
Apparently
CREATE_NO_WINDOWonly prevents the direct child from creating a visible window. It doesn't prevent the child from inheriting the console host. Grandchildren might still create a visible window since it doesn't pass the same creation flags (unlike console host, the flags are NOT inherited).DETACHED_PROCESSis necessary because it starts the background shell without any console attached in the first place, so PowerShell and its console-subsystem children have no foreground console host to flash.Linked Issue
Fixes #11224
Testing
I don't see flickering windows anymore.