Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)

This commit is contained in:
Anthony Dresser
2019-08-12 21:31:51 -07:00
committed by GitHub
parent 00250839fc
commit 7eba8c4c03
616 changed files with 9472 additions and 7087 deletions

View File

@@ -18,7 +18,7 @@ export class SharedProcess implements ISharedProcess {
private barrier = new Barrier();
private window: Electron.BrowserWindow | null;
private window: Electron.BrowserWindow | null = null;
constructor(
private readonly machineId: string,

View File

@@ -360,17 +360,6 @@ export class CodeWindow extends Disposable implements ICodeWindow {
this.pendingLoadConfig = undefined;
}
// To prevent flashing, we set the window visible after the page has finished to load but before Code is loaded
if (this._win && !this._win.isVisible()) {
if (this.windowState.mode === WindowMode.Maximized) {
this._win.maximize();
}
if (!this._win.isVisible()) { // maximize also makes visible
this._win.show();
}
}
});
// Window Focus
@@ -838,17 +827,16 @@ export class CodeWindow extends Disposable implements ICodeWindow {
}
private useNativeFullScreen(): boolean {
return true; // TODO@ben enable simple fullscreen again (https://github.com/microsoft/vscode/issues/75054)
// const windowConfig = this.configurationService.getValue<IWindowSettings>('window');
// if (!windowConfig || typeof windowConfig.nativeFullScreen !== 'boolean') {
// return true; // default
// }
const windowConfig = this.configurationService.getValue<IWindowSettings>('window');
if (!windowConfig || typeof windowConfig.nativeFullScreen !== 'boolean') {
return true; // default
}
// if (windowConfig.nativeTabs) {
// return true; // https://github.com/electron/electron/issues/16142
// }
if (windowConfig.nativeTabs) {
return true; // https://github.com/electron/electron/issues/16142
}
// return windowConfig.nativeFullScreen !== false;
return windowConfig.nativeFullScreen !== false;
}
isMinimized(): boolean {

View File

@@ -1149,9 +1149,10 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
}
}
// Linux/Windows: by default we open files in the new window unless triggered via DIALOG or MENU context
// Linux/Windows: by default we open files in the new window unless triggered via DIALOG / MENU context
// or from the integrated terminal where we assume the user prefers to open in the current window
else {
if (openConfig.context !== OpenContext.DIALOG && openConfig.context !== OpenContext.MENU) {
if (openConfig.context !== OpenContext.DIALOG && openConfig.context !== OpenContext.MENU && !(openConfig.userEnv && openConfig.userEnv['TERM_PROGRAM'] === 'vscode')) {
openFilesInNewWindow = true;
}
}
@@ -1255,10 +1256,9 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
openConfig.cli['file-uri'] = fileUris;
// if there are no files or folders cli args left, use the "remote" cli argument
if (!cliArgs.length && !folderUris.length && !fileUris.length) {
if (authority) {
openConfig.cli.remote = authority;
}
const noFilesOrFolders = !cliArgs.length && !folderUris.length && !fileUris.length;
if (noFilesOrFolders && authority) {
openConfig.cli.remote = authority;
}
// Open it
@@ -1266,7 +1266,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
context: openConfig.context,
cli: openConfig.cli,
forceNewWindow: true,
forceEmpty: !cliArgs.length && !folderUris.length && !fileUris.length,
forceEmpty: noFilesOrFolders,
userEnv: openConfig.userEnv,
noRecentEntry: true,
waitMarkerFileURI: openConfig.waitMarkerFileURI
@@ -2116,4 +2116,4 @@ function resourceFromURIToOpen(u: IURIToOpen): URI {
}
return u.fileUri;
}
}