Skip to content

Start background update in Windows-less mode to avoid stealing focus#293054

Draft
dmitrivMS wants to merge 2 commits intomainfrom
dev/dmitriv/windows-update-focus-loss
Draft

Start background update in Windows-less mode to avoid stealing focus#293054
dmitrivMS wants to merge 2 commits intomainfrom
dev/dmitriv/windows-update-focus-loss

Conversation

@dmitrivMS
Copy link
Contributor

Fixes #142543

@dmitrivMS dmitrivMS added this to the February 2026 milestone Feb 5, 2026
@dmitrivMS dmitrivMS self-assigned this Feb 5, 2026
Copilot AI review requested due to automatic review settings February 5, 2026 09:09
@dmitrivMS dmitrivMS added install-update VS Code installation and upgrade system issues windows VS Code on Windows issues labels Feb 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an issue where background updates on Windows steal focus from the active VS Code window. The fix adds the windowsHide: true option to the spawn call that launches the background update installer.

Changes:

  • Added windowsHide: true option to the spawn options when starting the background update installer in Windows

Copy link
Collaborator

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

Inno setup is built as a GUI app /SUBSYSTEM:Windows, lets wait for a repro before proceeding :)

@dmitrivMS
Copy link
Contributor Author

Inno setup is built as a GUI app /SUBSYSTEM:Windows, lets wait for a repro before proceeding :)

Will keep diggoing.

@dmitrivMS dmitrivMS marked this pull request as draft February 5, 2026 10:41
Comment on lines +312 to +313
windowsVerbatimArguments: true,
windowsHide: true
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure this is doing anything? nodejs/node#21825 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was only thinking of console vs not-console application, good call on the detached. From https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags?redirectedfrom=MSDN

CREATE_NO_WINDOW0x08000000 | The process is a console application that is being run without a console window. Therefore, the console handle for the application is not set.This flag is ignored if the application is not a console application, or if it is used with either CREATE_NEW_CONSOLE or DETACHED_PROCESS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

install-update VS Code installation and upgrade system issues windows VS Code on Windows issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Background update on Windows steals focus

3 participants