修复Mac下即使开启了托盘, cmd+w 仍会中断播放的问题(#1844)

This commit is contained in:
lyswhut
2024-04-28 18:59:09 +08:00
parent 4760f79ab5
commit 09780d02e3
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -13,7 +13,13 @@ const winEvent = () => {
if (!browserWindow) return
browserWindow.on('close', event => {
if (global.lx.isSkipTrayQuit || !global.lx.appSetting['tray.enable'] || (!isWin && !global.lx.isTrafficLightClose)) {
if (
global.lx.isSkipTrayQuit ||
!global.lx.appSetting['tray.enable'] ||
// linux下,如果不是点击软件上的关闭按钮退出的操作都直接退出
// https://github.com/lyswhut/lx-music-desktop/issues/191
(isLinux && !global.lx.isTrafficLightClose)
) {
browserWindow!.setProgressBar(-1)
// global.lx.mainWindowClosed = true
global.lx.event_app.main_window_close()