mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 15:01:57 +01:00
Update to electron 1.6.x (#23842)
This commit is contained in:
@@ -35,7 +35,6 @@ export interface IWindowCreationOptions {
|
||||
state: IWindowState;
|
||||
extensionDevelopmentPath?: string;
|
||||
isExtensionTestHost?: boolean;
|
||||
titleBarStyle?: 'native' | 'custom';
|
||||
}
|
||||
|
||||
export enum WindowMode {
|
||||
@@ -190,7 +189,8 @@ export class VSCodeWindow {
|
||||
show: !isFullscreenOrMaximized,
|
||||
title: product.nameLong,
|
||||
webPreferences: {
|
||||
'backgroundThrottling': false // by default if Code is in the background, intervals and timeouts get throttled
|
||||
'backgroundThrottling': false, // by default if Code is in the background, intervals and timeouts get throttled,
|
||||
disableBlinkFeatures: 'Auxclick' // disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick)
|
||||
}
|
||||
};
|
||||
|
||||
@@ -198,14 +198,26 @@ export class VSCodeWindow {
|
||||
options.icon = path.join(this.environmentService.appRoot, 'resources/linux/code.png'); // Windows and Mac are better off using the embedded icon(s)
|
||||
}
|
||||
|
||||
const windowConfig = this.configurationService.getConfiguration<IWindowSettings>('window');
|
||||
|
||||
let useNativeTabs = false;
|
||||
if (windowConfig && windowConfig.nativeTabs) {
|
||||
options.tabbingIdentifier = product.nameShort; // this opts in to sierra tabs
|
||||
useNativeTabs = true;
|
||||
}
|
||||
|
||||
let useCustomTitleStyle = false;
|
||||
if (platform.isMacintosh && (!this.options.titleBarStyle || this.options.titleBarStyle === 'custom')) {
|
||||
if (platform.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
|
||||
}
|
||||
|
||||
if (useCustomTitleStyle) {
|
||||
options.titleBarStyle = 'hidden';
|
||||
this.hiddenTitleBarStyle = true;
|
||||
|
||||
@@ -851,8 +851,7 @@ export class WindowsManager implements IWindowsMainService {
|
||||
vscodeWindow = new VSCodeWindow({
|
||||
state,
|
||||
extensionDevelopmentPath: configuration.extensionDevelopmentPath,
|
||||
isExtensionTestHost: !!configuration.extensionTestsPath,
|
||||
titleBarStyle: windowConfig ? windowConfig.titleBarStyle : void 0
|
||||
isExtensionTestHost: !!configuration.extensionTestsPath
|
||||
},
|
||||
this.logService,
|
||||
this.environmentService,
|
||||
|
||||
Reference in New Issue
Block a user