Merge from vscode 313ede61cbad8f9dc748907b3384e059ddddb79a (#7436)

* Merge from vscode 313ede61cbad8f9dc748907b3384e059ddddb79a

* fix strict null checks
This commit is contained in:
Anthony Dresser
2019-09-30 23:35:45 -07:00
committed by GitHub
parent 6ab03053a0
commit 084524cd2d
196 changed files with 2927 additions and 2547 deletions

View File

@@ -141,6 +141,7 @@ export class LaunchMainService implements ILaunchMainService {
}
}
// Open new Window
if (openNewWindow) {
usedWindows = this.windowsMainService.open({
context,
@@ -150,8 +151,18 @@ export class LaunchMainService implements ILaunchMainService {
forceEmpty: true,
waitMarkerFileURI
});
} else {
usedWindows = [this.windowsMainService.focusLastActive(args, context)];
}
// Focus existing window or open if none opened
else {
const lastActive = this.windowsMainService.getLastActiveWindow();
if (lastActive) {
lastActive.focus();
usedWindows = [lastActive];
} else {
usedWindows = this.windowsMainService.open({ context, cli: args, forceEmpty: true });
}
}
}
@@ -216,7 +227,7 @@ export class LaunchMainService implements ILaunchMainService {
mainPID: process.pid,
mainArguments: process.argv.slice(1),
windows,
screenReader: !!app.accessibilitySupportEnabled,
screenReader: !!app.isAccessibilitySupportEnabled(),
gpuFeatureStatus: app.getGPUFeatureStatus()
});
}