From 09780d02e3209debb9d6240b934ac1f71d79948b Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 28 Apr 2024 18:59:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DMac=E4=B8=8B=E5=8D=B3?= =?UTF-8?q?=E4=BD=BF=E5=BC=80=E5=90=AF=E4=BA=86=E6=89=98=E7=9B=98=EF=BC=8C?= =?UTF-8?q?=20`cmd+w`=20=E4=BB=8D=E4=BC=9A=E4=B8=AD=E6=96=AD=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=88#1844=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/main/modules/winMain/main.ts | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index b11532b3..0051c6b6 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -12,6 +12,7 @@ - 增大在线导入自定义源文件的大小限制问题(#1857) - 修复Mac下窗口出现残留阴影的问题,这解决了Mac下桌面歌词出现残留阴影的远古bug,感谢 @zclorne (#1869, Thanks @zclorne) - 增大在线导入自定义源文件的大小限制,解决某些音源无法导入的问题(#1857) +- 修复Mac下即使开启了托盘, `cmd+w` 仍会中断播放的问题(#1844) ### 变更 diff --git a/src/main/modules/winMain/main.ts b/src/main/modules/winMain/main.ts index 498f85a7..cb52401a 100644 --- a/src/main/modules/winMain/main.ts +++ b/src/main/modules/winMain/main.ts @@ -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()