Skip to content

fix: consider wco on the left side - #310602

Closed
tarik02 (tarik02) wants to merge 1 commit into
microsoft:mainfrom
tarik02:fix/consider-desktop-wco-on-left-side
Closed

tarik02 (tarik02) wants to merge 1 commit into
microsoft:mainfrom
tarik02:fix/consider-desktop-wco-on-left-side

Conversation

@tarik02

@tarik02 tarik02 (tarik02) commented Apr 16, 2026 •

Copy link
Copy Markdown

Fixes #332131

Updates the custom title bar layout to support native window controls on either side.

When Window Controls Overlay is enabled, VS Code now creates left and right spacers and sizes them using the titlebar-area-* environment variables. This prevents title bar content from overlapping left-side controls introduced by
Electron 43.

The existing zoom-aware 138px width remains unchanged when native WCO is disabled. The same behavior is applied to the Agents window title bar.

Before and after

image

Testing

Requires Electron 43+ and a Linux desktop that supports configuring the window controls position.

  1. Configure the desktop window controls to appear on the left.
  2. Launch VS Code with "window.titleBarStyle": "custom" and "window.controlsStyle": "native".
  3. Verify the title bar reserves the left area reported by env(titlebar-area-x).
  4. Move the controls to the right and restart VS Code.
  5. Verify the right-side window-control area remains reserved.
  6. Set "window.controlsStyle": "custom" and restart VS Code.
  7. Verify the custom HTML controls retain their zoom-aware 138px width.
  8. Repeat the native left and right checks in the Agents window.

@vs-code-engineering

vs-code-engineering Bot commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/sessions/browser/parts/titlebarPart.ts
  • src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css
  • src/vs/workbench/browser/parts/titlebar/titlebarPart.ts

@tarik02

Copy link
Copy Markdown
Author

Benjamin Christopher Simmonds (@benibenj) electron has merged PR other that makes windows respect system settings and now it may be WCO on left side. Next electron release is going to have impact on vscode breaking the layout.

@tarik02
tarik02 (tarik02) force-pushed the fix/consider-desktop-wco-on-left-side branch from 331f1fd to 59d32bb Compare August 22, 2026 17:05
Copilot AI balanced review requested due to automatic review settings August 22, 2026 17:05

Copilot AI left a comment

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.

Pull request overview

Updates title-bar spacing to support window controls on either side.

Changes:

  • Adds opposite-side window-control spacers on desktop.
  • Applies WCO environment sizing beyond web contexts.
  • Removes fixed desktop control widths.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
titlebarPart.ts Creates control-overlay containers on both sides.
titlebarpart.css Sizes control spacers using WCO environment variables.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@flying-sheep

Copy link
Copy Markdown
Contributor

Awesome, finally VS Code follows my system appearance!

@deepak1556

Copy link
Copy Markdown
Collaborator

Closing in favor of #332935

@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom title bar overlaps left-side window controls with Electron 43

6 participants