修复Linux版开启托盘无法退出的问题

pull/277/head
lyswhut 2020-05-02 20:01:36 +08:00
parent 2cabe6e58e
commit aa87640687
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
### 修复
- 修复按住`Ctrl`等键触发多选机制时不松开按键的情况下切换到其他窗口后再松开按键,这时切回软件不按按键都处在多选模式的问题
- 修复Linux版开启托盘无法退出的问题

View File

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