From 17c2d8a850e590f5f7d53c568886307807b44976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Sat, 12 Dec 2020 19:32:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddock=E6=A0=8F=E7=82=B9?= =?UTF-8?q?=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.js b/src/main.js index 576b4f6..46dd11b 100644 --- a/src/main.js +++ b/src/main.js @@ -103,6 +103,13 @@ app.once('ready', () => { app.__float__ = null app.exit() }) + + // mac专属事件,点击dock栏图标,可激活窗口 + app.on('activate', _ => { + if (app.__main__) { + app.__main__.restore() + } + }) }) ipcMain.on('app', (ev, conn) => {