diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index c0f271d77120..6628923e9237 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -205,18 +205,27 @@ export class VSCodeWindow implements IVSCodeWindow { options.icon = path.join(this.environmentService.appRoot, 'resources/linux/code.png'); // Windows and Mac are better off using the embedded icon(s) } + let useCustomTitleStyle = false; if (platform.isMacintosh && (!this.options.titleBarStyle || this.options.titleBarStyle === 'custom')) { const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath; if (!isDev) { - options.titleBarStyle = 'hidden'; // not enabled when developing due to https://github.com/electron/electron/issues/3647 - this.hiddenTitleBarStyle = true; + useCustomTitleStyle = true; // not enabled when developing due to https://github.com/electron/electron/issues/3647 } } + if (useCustomTitleStyle) { + options.titleBarStyle = 'hidden'; + this.hiddenTitleBarStyle = true; + } + // Create the browser window. this._win = new BrowserWindow(options); this._id = this._win.id; + if (useCustomTitleStyle) { + this._win.setSheetOffset(22); // offset dialogs by the height of the custom title bar if we have any + } + if (isFullscreenOrMaximized) { this.win.maximize();