修复Linux版开启托盘无法退出的问题
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user