Skip to content

prevent flickering windows on Windows by adding DETACHED_PROCESS#11926

Draft
acarl005 wants to merge 1 commit into
masterfrom
andy/fix-flickering-windows-on-windows
Draft

prevent flickering windows on Windows by adding DETACHED_PROCESS#11926
acarl005 wants to merge 1 commit into
masterfrom
andy/fix-flickering-windows-on-windows

Conversation

@acarl005
Copy link
Copy Markdown
Contributor

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_WINDOW only 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_PROCESS is 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.

@acarl005 acarl005 added this to the May-June 2026 milestone May 30, 2026
@acarl005 acarl005 requested a review from danielpeng2 May 30, 2026 06:46
@acarl005 acarl005 self-assigned this May 30, 2026
@cla-bot cla-bot Bot added the cla-signed label May 30, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 30, 2026

@acarl005

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_WINDOW is ignored when DETACHED_PROCESS is 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

Comment on lines +107 to +109
let flags = Threading::CREATE_NO_WINDOW.0
| Threading::DETACHED_PROCESS.0
| Threading::CREATE_BREAKAWAY_FROM_JOB.0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 [SUGGESTION] DETACHED_PROCESS causes Windows to ignore CREATE_NO_WINDOW, so keeping both makes the effective console behavior harder to reason about.

Suggested change
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;

@acarl005 acarl005 removed the request for review from danielpeng2 May 30, 2026 06:55
@acarl005 acarl005 marked this pull request as draft May 30, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Background subprocesses (git, gh, docker) spawn visible conhost.exe windows that steal focus from fullscreen apps

1 participant