Skip to content

Commit

Permalink
Disable custom title bar rendering on macOS (microsoft#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
kburtram authored Dec 19, 2017
1 parent a75c799 commit dbb421f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/vs/code/electron-main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,16 @@ export class CodeWindow implements ICodeWindow {
}

let useCustomTitleStyle = false;
if (isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom')) {
const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath;
if (!isDev) {
useCustomTitleStyle = true; // not enabled when developing due to https://github.com/electron/electron/issues/3647
}
}

// {{SQL CARBON EDIT}}
// turn-off custom menus to avoid bug calculating size of SQL editor
//
// if (isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom')) {
// const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath;
// if (!isDev) {
// useCustomTitleStyle = true; // not enabled when developing due to https://github.com/electron/electron/issues/3647
// }
// }

if (useNativeTabs) {
useCustomTitleStyle = false; // native tabs on sierra do not work with custom title style
Expand Down
3 changes: 3 additions & 0 deletions src/vs/workbench/electron-browser/workbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,8 @@ export class Workbench implements IPartService {
}

private getCustomTitleBarStyle(): 'custom' {
// {{SQL CARBON EDIT}}
/*
if (!isMacintosh) {
return null; // custom title bar is only supported on Mac currently
}
Expand All @@ -854,6 +856,7 @@ export class Workbench implements IPartService {
return style;
}
}
*/

return null;
}
Expand Down

0 comments on commit dbb421f

Please sign in to comment.