提交 46c0393a 编写于 作者: B Benjamin Pasero

try workaround for not being able to focus window on win & linux

上级 cfbddb84
......@@ -174,7 +174,11 @@ export class ElectronWindow {
public focus(): void {
if (!this.win.isFocused()) {
this.win.focus();
if (platform.isWindows || platform.isLinux) {
this.win.show(); // Windows & Linux sometimes cannot bring the window to the front when it is in the background
} else {
this.win.focus();
}
}
}
......
......@@ -215,7 +215,11 @@ export class VSCodeWindow {
this._win.restore();
}
this._win.focus();
if (platform.isWindows || platform.isLinux) {
this._win.show(); // Windows & Linux sometimes cannot bring the window to the front when it is in the background
} else {
this._win.focus();
}
}
public get lastFocusTime(): number {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册