From aa8764068796e0011c0f10e9743dc830e6b0db3f Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 2 May 2020 20:01:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DLinux=E7=89=88=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E6=89=98=E7=9B=98=E6=97=A0=E6=B3=95=E9=80=80=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/main/rendererEvents/winEvent.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 90a434e3..743d506b 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,3 +1,4 @@ ### 修复 - 修复按住`Ctrl`等键触发多选机制时不松开按键的情况下切换到其他窗口后再松开按键,这时切回软件不按按键都处在多选模式的问题 +- 修复Linux版开启托盘无法退出的问题 diff --git a/src/main/rendererEvents/winEvent.js b/src/main/rendererEvents/winEvent.js index 35d0df1f..42957e21 100644 --- a/src/main/rendererEvents/winEvent.js +++ b/src/main/rendererEvents/winEvent.js @@ -1,10 +1,10 @@ -const { isMac } = require('../../common/utils') +const { isWin } = require('../../common/utils') global.isQuitting = false global.isTrafficLightClose = false // 是否点击软件上的关闭按钮关闭 module.exports = mainWindow => { mainWindow.on('close', event => { - if (global.isQuitting || !global.appSetting.tray.isToTray || (isMac && !global.isTrafficLightClose)) { + if (global.isQuitting || !global.appSetting.tray.isToTray || (!isWin && !global.isTrafficLightClose)) { mainWindow.setProgressBar(-1) return }