Skip to content

Commit

Permalink
修复Mac下即使开启了托盘, cmd+w 仍会中断播放的问题(#1844
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Apr 28, 2024
1 parent 4760f79 commit 09780d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions publish/changeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- 增大在线导入自定义源文件的大小限制问题(#1857
- 修复Mac下窗口出现残留阴影的问题,这解决了Mac下桌面歌词出现残留阴影的远古bug,感谢 @zclorne#1869, Thanks @zclorne
- 增大在线导入自定义源文件的大小限制,解决某些音源无法导入的问题(#1857
- 修复Mac下即使开启了托盘, `cmd+w` 仍会中断播放的问题(#1844

### 变更

Expand Down
8 changes: 7 additions & 1 deletion src/main/modules/winMain/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 09780d0

Please sign in to comment.