提交 43f633c1 编写于 作者: B Benjamin Pasero

real fix for devtool focus issue

上级 6e57a3c8
......@@ -476,6 +476,10 @@ declare module Electron {
* @returns Whether the window is visible on all workspaces.
*/
isVisibleOnAllWorkspaces(): boolean;
/**
* @returns Whether dev tools are focused or not.
*/
isDevToolsFocused(): boolean;
}
interface WebPreferences {
......
......@@ -654,7 +654,7 @@ export class VSCodeMenu {
return;
}
if (windowInFocus.win.webContents.isDevToolsFocused && windowInFocus.win.webContents.isDevToolsFocused()) { // timing issue, sometimes isDevToolsFocused is not defined?
if (windowInFocus.win.isDevToolsFocused()) {
devToolsFocusedFn(windowInFocus.win.devToolsWebContents);
} else {
windows.manager.sendToFocused('vscode:runAction', actionId);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册