-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable wco on macOS #239666
feat: enable wco on macOS #239666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am searching through our code to understand where we depend on window.*overlay
or WCO
and I think in each case we need to revisit what this means for macOS:
-
vscode/src/vs/workbench/browser/layout.ts
Line 583 in 013ebea
useWindowControlsOverlay(this.configurationService) || // not working with WCO (border cannot draw over the overlay) -
const wcoEnabled = isWeb && isWCOEnabled(); -
value = Math.max(value, getWCOTitlebarAreaRect(getWindow(this.element))?.height ?? 0); -
vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
Lines 492 to 494 in 013ebea
if (isWCOEnabled()) { this.windowControlsContainer.classList.add('wco-enabled'); } -
vscode/src/vs/workbench/electron-sandbox/parts/titlebar/titlebarPart.ts
Lines 237 to 238 in 013ebea
// WCO styles only supported on Windows currently if (useWindowControlsOverlay(this.configurationService)) { -
vscode/src/vs/workbench/services/layout/browser/layoutService.ts
Lines 365 to 368 in 013ebea
// if WCO is visible, we have to show the title bar if (isWCOEnabled() && !inFullscreen) { return true; } -
Line 137 in 013ebea
// Windows Control Overlay is rendered correctly on Windows. -
vscode/src/vs/base/browser/browser.ts
Line 113 in 013ebea
const standaloneMatchMedia = mainWindow.matchMedia('(display-mode: standalone) or (display-mode: window-controls-overlay)'); -
vscode/src/vs/workbench/browser/layout.ts
Line 583 in 013ebea
useWindowControlsOverlay(this.configurationService) || // not working with WCO (border cannot draw over the overlay) -
if (useWindowControlsOverlay(this.configurationService)) {
Starting PR to see if we can unify the use of
navigator.windowControlsOverlay
across platform.The traffic lights are controlled similar to
titlebarStyle: 'hidden'
mode, instead of callingsetTitleBarOverlay
we adjust the height viasetWindowButtonPosition
. Color and symbol color does not apply to traffic lights.