This commit is contained in:
shenmo 2022-09-02 13:46:28 +08:00
parent c8c60e693f
commit c4703eb5ba

@ -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,