From 8088dca251b956e11bbf32c8c8c5b4461a9c5d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Fri, 27 Sep 2024 11:31:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/gui/src/background.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/gui/src/background.js b/packages/gui/src/background.js index b4a910f1..9bab6aea 100644 --- a/packages/gui/src/background.js +++ b/packages/gui/src/background.js @@ -204,6 +204,7 @@ function createWindow (startHideWindow) { } win.on('closed', async () => { + log.info('win closed:', arguments) win = null tray = null }) @@ -217,6 +218,7 @@ function createWindow (startHideWindow) { }) win.on('close', (e) => { + log.info('win close:', arguments) if (forceClose) { return } @@ -240,7 +242,7 @@ function createWindow (startHideWindow) { }) win.on('session-end', async (e) => { - log.info('session-end:', e) + log.info('win session-end:', arguments) await quit() }) @@ -281,7 +283,7 @@ function createWindow (startHideWindow) { // 监听渲染进程发送过来的消息 win.webContents.on('ipc-message', (event, channel, message) => { - console.info(arguments) + console.info('win ipc-message:', arguments) if (channel === 'change-showHideShortcut') { registerShowHideShortcut(message) } @@ -380,8 +382,8 @@ if (!isFirstInstance) { } }) app.on('will-quit', () => { - globalShortcut.unregisterAll() log.info('应用关闭,注销所有快捷键') + globalShortcut.unregisterAll() }) app.on('second-instance', (event, commandLine) => { log.info('new app started, command:', commandLine)