屏蔽设置

This commit is contained in:
lyswhut
2022-06-18 11:50:54 +08:00
parent f33947287c
commit a31180260b
4 changed files with 8 additions and 5 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ const { common: COMMON_EVENT_NAME, winLyric: WIN_LYRIC_EVENT_NAME, hotKey: HOT_K
const { mainSend, NAMES: { winLyric: ipcWinLyricNames } } = require('../../../common/ipc')
const { desktop_lyric } = require('../../../common/hotKey')
const { getLyricWindowBounds } = require('./utils')
const { isLinux } = require('@common/utils')
let isLock = null
let isEnable = null
@@ -47,9 +48,9 @@ const setLrcConfig = () => {
if (isLock != desktopLyric.isLock) {
isLock = desktopLyric.isLock
if (desktopLyric.isLock) {
global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: true })
global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux })
} else {
global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: true })
global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: !isLinux })
}
}
if (isAlwaysOnTop != desktopLyric.isAlwaysOnTop) {
+1 -1
View File
@@ -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: true })
global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux })
}
// linux下每次重开时貌似要重新设置置顶
if (isLinux && global.appSetting.desktopLyric.isAlwaysOnTop) {