Change:
I tried enabling it in my Code-OSS settings but it didn't seem to work. The sentence from that I quoted make me think it had been hardwired off in Code-OSS. I haven't searched the codebase yet though. Originally posted by in
OSS does seem to have the WCO disabled. says that WCO was disabled in OSS due to upstream issues, but there's been a bunch of fixes recently, so it's probably OK to enable it again.
Verification steps: the WCO in OSS by enabling the setting. VS Code when prompted and change the colour theme. Windows 11, one can verify the WCO has been enabled by checking that the snap layout UX is available. On Windows 10, one can verify the WCO has been enabled by switching through colour themes and checking that the area with the minimize/maximize/close buttons updates its colours before the rest of the titlebar does.

Discussion:
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IEditorOptions } from 'vs/platform/editor/common/editor'; import { NativeParsedArgs } from 'vs/platform/environment/common/argv'; <del> import { IEnvironmentService } from 'vs/platform/environment/common/environment'; </del> import { FileType } from 'vs/platform/files/common/files'; import { LogLevel } from 'vs/platform/log/common/log'; import { PolicyDefinition, PolicyValue } from 'vs/platform/policy/common/policy';

return isLinux ? 'native' : 'custom'; // default to custom on all macOS and Windows } <del> export function useWindowControlsOverlay(configurationService: IConfigurationService, environmentService: IEnvironmentService): boolean { if (!isWindows || isWeb || !environmentService.isBuilt) { return false; // only supported on a built desktop windows instance </del> <ins> export function useWindowControlsOverlay(configurationService: IConfigurationService): boolean { if (!isWindows || isWeb) { return false; // only supported on a desktop Windows instance </ins> } if (getTitleBarStyle(configurationService) === 'native') {

options.frame = false; } <del> if (useWindowControlsOverlay(this.configurationService, this.environmentMainService)) { </del> <ins> if (useWindowControlsOverlay(this.configurationService)) { </ins> // This logic will not perfectly guess the right colors // to use on initialization, but prefer to keep things

} // Update the window controls immediately based on cached values <del> if (useCustomTitleStyle && ((isWindows && useWindowControlsOverlay(this.configurationService, this.environmentMainService)) || isMacintosh)) { </del> <ins> if (useCustomTitleStyle && ((isWindows && useWindowControlsOverlay(this.configurationService)) || isMacintosh)) { </ins> const cachedWindowControlHeight = this.stateMainService.getItem<number>((CodeWindow.windowControlHeightStateStorageKey)); if (cachedWindowControlHeight) { this.updateWindowControls({ height: cachedWindowControlHeight });

super.updateStyles(); // WCO styles only supported on Windows currently <del> if (useWindowControlsOverlay(this.configurationService, this.environmentService)) { </del> <ins> if (useWindowControlsOverlay(this.configurationService)) { </ins> if (!this.cachedWindowControlStyles || this.cachedWindowControlStyles.bgColor !== this.element.style.backgroundColor || this.cachedWindowControlStyles.fgColor !== this.element.style.color) {

override layout(width: number, height: number): void { super.layout(width, height); <del> if (useWindowControlsOverlay(this.configurationService, this.environmentService) || </del> <ins> if (useWindowControlsOverlay(this.configurationService) || </ins> (isMacintosh && isNative && getTitleBarStyle(this.configurationService) === 'custom')) { // When the user goes into full screen mode, the height of the title bar becomes 0. // Instead, set it back to the default titlebar height for Catalina users