From f2d83f47ff33bf8f5e03dca6023cfb7a11925f62 Mon Sep 17 00:00:00 2001 From: George Garside Date: Fri, 29 Mar 2024 22:14:35 +0000 Subject: [PATCH] Don't use window.customTitleBarVisibility configuration on web (#209159) Fix #209159 by not changing behaviour on this unregistered (on web) configuration option. --- src/vs/workbench/services/layout/browser/layoutService.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/services/layout/browser/layoutService.ts b/src/vs/workbench/services/layout/browser/layoutService.ts index 8ab88812dcfa..769664b05742 100644 --- a/src/vs/workbench/services/layout/browser/layoutService.ts +++ b/src/vs/workbench/services/layout/browser/layoutService.ts @@ -320,9 +320,11 @@ export function shouldShowCustomTitleBar(configurationService: IConfigurationSer const inFullscreen = isFullscreen(window); const nativeTitleBarEnabled = hasNativeTitlebar(configurationService); - const showCustomTitleBar = configurationService.getValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY); - if (showCustomTitleBar === CustomTitleBarVisibility.NEVER && nativeTitleBarEnabled || showCustomTitleBar === CustomTitleBarVisibility.WINDOWED && inFullscreen) { - return false; + if (!isWeb) { + const showCustomTitleBar = configurationService.getValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY); + if (showCustomTitleBar === CustomTitleBarVisibility.NEVER && nativeTitleBarEnabled || showCustomTitleBar === CustomTitleBarVisibility.WINDOWED && inFullscreen) { + return false; + } } if (!isTitleBarEmpty(configurationService)) {