@@ -22,6 +22,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
2222import { Codicon } from 'vs/base/common/codicons' ;
2323import { NativeMenubarControl } from 'vs/workbench/electron-sandbox/parts/titlebar/menubarControl' ;
2424import { IHoverService } from 'vs/workbench/services/hover/browser/hover' ;
25+ import { IProductService } from 'vs/platform/product/common/productService' ;
2526
2627export class TitlebarPart extends BrowserTitleBarPart {
2728 private maxRestoreControl : HTMLElement | undefined ;
@@ -58,6 +59,7 @@ export class TitlebarPart extends BrowserTitleBarPart {
5859 @IConfigurationService configurationService : IConfigurationService ,
5960 @INativeWorkbenchEnvironmentService environmentService : INativeWorkbenchEnvironmentService ,
6061 @IInstantiationService instantiationService : IInstantiationService ,
62+ @IProductService productService : IProductService ,
6163 @IThemeService themeService : IThemeService ,
6264 @IStorageService storageService : IStorageService ,
6365 @IWorkbenchLayoutService layoutService : IWorkbenchLayoutService ,
@@ -66,7 +68,7 @@ export class TitlebarPart extends BrowserTitleBarPart {
6668 @INativeHostService private readonly nativeHostService : INativeHostService ,
6769 @IHoverService hoverService : IHoverService ,
6870 ) {
69- super ( contextMenuService , configurationService , environmentService , instantiationService , themeService , storageService , layoutService , contextKeyService , hostService , hoverService ) ;
71+ super ( contextMenuService , configurationService , environmentService , instantiationService , productService , themeService , storageService , layoutService , contextKeyService , hostService , hoverService ) ;
7072
7173 this . environmentService = environmentService ;
7274 }
@@ -216,7 +218,7 @@ export class TitlebarPart extends BrowserTitleBarPart {
216218 super . updateStyles ( ) ;
217219
218220 // WCO styles only supported on Windows currently
219- if ( useWindowControlsOverlay ( this . configurationService ) ) {
221+ if ( useWindowControlsOverlay ( this . configurationService , this . productService ) ) {
220222 if ( ! this . cachedWindowControlStyles ||
221223 this . cachedWindowControlStyles . bgColor !== this . element . style . backgroundColor ||
222224 this . cachedWindowControlStyles . fgColor !== this . element . style . color ) {
@@ -228,7 +230,7 @@ export class TitlebarPart extends BrowserTitleBarPart {
228230 override layout ( width : number , height : number ) : void {
229231 super . layout ( width , height ) ;
230232
231- if ( useWindowControlsOverlay ( this . configurationService ) ||
233+ if ( useWindowControlsOverlay ( this . configurationService , this . productService ) ||
232234 ( isMacintosh && isNative && getTitleBarStyle ( this . configurationService ) === 'custom' ) ) {
233235 // When the user goes into full screen mode, the height of the title bar becomes 0.
234236 // Instead, set it back to the default titlebar height for Catalina users
0 commit comments