Merge branch 'master' into sandy081/supportCredentials

This commit is contained in:
Sandeep Somavarapu
2020-09-02 14:50:52 +02:00
committed by GitHub
16 changed files with 66 additions and 42 deletions

View File

@@ -336,7 +336,18 @@ export class CodeWindow extends Disposable implements ICodeWindow {
return !!this.documentEdited;
}
focus(): void {
focus(options?: { force: boolean }): void {
// macOS: Electron >6.x changed its behaviour to not
// bring the application to the foreground when a window
// is focused programmatically. Only via `app.focus` and
// the option `steal: true` can you get the previous
// behaviour back. The only reason to use this option is
// when a window is getting focused while the application
// is not in the foreground.
if (isMacintosh && options?.force) {
app.focus({ steal: true });
}
if (!this._win) {
return;
}
@@ -719,7 +730,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
this.showTimeoutHandle = setTimeout(() => {
if (this._win && !this._win.isVisible() && !this._win.isMinimized()) {
this._win.show();
this._win.focus();
this.focus({ force: true });
this._win.webContents.openDevTools();
}
}, 10000);