From c4703eb5bad3e8f93f2bc53b2733f19c09390982 Mon Sep 17 00:00:00 2001 From: shenmo <jifengshenmo@outlook.com> Date: Fri, 2 Sep 2022 13:46:28 +0800 Subject: [PATCH] single --- main.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index a77d3fd..24ecf24 100644 --- a/main.js +++ b/main.js @@ -479,10 +479,7 @@ function createMenu() { mainWindow.setMenu(menu); } } - -function createMainWindow = () => { - - // 实现单例,在启动第二个实例后,激活主窗口,然后退出第二个实例 +// 实现单例,在启动第二个实例后,激活主窗口,然后退出第二个实例 const shouldQuit = app.makeSingleInstance(() => { if (mainWindow) { if (mainWindow.isMinimized()) mainWindow.restore() @@ -492,6 +489,7 @@ const shouldQuit = app.makeSingleInstance(() => { shouldQuit && app.quit() +const createMainWindow = () => { var mainWindowState = windowStateKeeper({ defaultWidth: 1300, defaultHeight: 700,