From ed57411bbbc7b8eb77aa71119b04fe65f19b7fe0 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 10 Nov 2022 14:34:52 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=B8=BB=E7=AA=97=E5=8F=A3=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=8D=95=E7=8B=AC=E5=85=B3=E9=97=AD=E5=88=B0=E5=90=8E?= =?UTF-8?q?=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/electron.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/electron/electron.js b/electron/electron.js index 7cfaa784f..db6637ea2 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -68,7 +68,7 @@ function createMainWindow() { if (process.platform === 'win32') { mainWindow.hide() } else if (process.platform === 'darwin') { - app.hide() + mainWindow.hide() } else { app.quit() } @@ -195,7 +195,11 @@ if (!getTheLock) { } app.on('activate', () => { - if (BrowserWindow.getAllWindows().length === 0) createMainWindow() + if (BrowserWindow.getAllWindows().length === 0) { + createMainWindow() + } else if (!mainWindow.isVisible()) { + mainWindow.show() + } }) app.on('window-all-closed', () => {