From cf9d98d43462bed10d39091cb1b290a41c9e1f46 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Mon, 20 Jun 2022 12:02:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8B=A5=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E6=AD=8C=E8=AF=8D=E7=AA=97=E5=8F=A3=E4=B8=8E=E4=B8=BB=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E9=87=8D=E5=8F=A0=E6=97=B6=EF=BC=8C=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E5=88=92=E8=BF=87=E9=87=8D=E5=8F=A0=E5=8C=BA=E5=9F=9F=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E4=BC=9A=E9=97=AA=E7=83=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/main/modules/winLyric/event.js | 11 +++++++++-- src/main/modules/winLyric/index.js | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 68093683..ee058a88 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,3 +1,4 @@ ### 修复 - 修复处于不支持的源时,歌单、排行榜的右键下载菜单没有禁用的问题 +- 修复若桌面歌词窗口与主窗口重叠时,鼠标划过重叠区域鼠标会闪烁的问题,注:此修复只对未启用“鼠标移入歌词区域时降低歌词透明度”时有效 diff --git a/src/main/modules/winLyric/event.js b/src/main/modules/winLyric/event.js index f29a9997..09e6bcc3 100644 --- a/src/main/modules/winLyric/event.js +++ b/src/main/modules/winLyric/event.js @@ -9,6 +9,7 @@ let isEnable = null let isAlwaysOnTop = null let isAlwaysOnTopLoop = null let isLockScreen = null +let isHoverHide = null const alwaysOnTopTools = { timeout: null, @@ -48,9 +49,15 @@ const setLrcConfig = () => { if (isLock != desktopLyric.isLock) { isLock = desktopLyric.isLock if (desktopLyric.isLock) { - global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux }) + global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux && global.appSetting.desktopLyric.isHoverHide }) } else { - global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: !isLinux }) + global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: !isLinux && global.appSetting.desktopLyric.isHoverHide }) + } + } + if (isHoverHide != desktopLyric.isHoverHide) { + isHoverHide = desktopLyric.isHoverHide + if (!isLinux) { + global.modules.lyricWindow.setIgnoreMouseEvents(desktopLyric.isLock, { forward: global.appSetting.desktopLyric.isHoverHide }) } } if (isAlwaysOnTop != desktopLyric.isAlwaysOnTop) { diff --git a/src/main/modules/winLyric/index.js b/src/main/modules/winLyric/index.js index 754d7778..45057b32 100644 --- a/src/main/modules/winLyric/index.js +++ b/src/main/modules/winLyric/index.js @@ -64,7 +64,7 @@ const winEvent = lyricWindow => { lyricWindow.once('ready-to-show', () => { lyricWindow.show() if (global.appSetting.desktopLyric.isLock) { - global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux }) + global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux && global.appSetting.desktopLyric.isHoverHide }) } // linux下每次重开时貌似要重新设置置顶 if (isLinux && global.appSetting.desktopLyric.isAlwaysOnTop) {