修复-- bug 工具在桌面和pdf切换

This commit is contained in:
zdg 2024-09-05 01:30:24 +08:00
parent b794d55cd7
commit 1c69d10263
1 changed files with 4 additions and 2 deletions

View File

@ -275,11 +275,13 @@ const eventHandles = (type, win) => {
// 监听窗口的激活事件 // 监听窗口的激活事件
win.on('focus', async () => { win.on('focus', async () => {
console.log('激活窗口')
toolState.isPdfWin=true toolState.isPdfWin=true
await sleep(20) // 延时 await sleep(20) // 延时
toolState.showBoardAll=false //恢复默认值 toolState.showBoardAll=false //恢复默认值
await sleep(50) // 延时 // await sleep(50) // 延时
// 穿透开启
if (toolState.isToolWin) ipcRenderer.invoke('tool-sphere:set:ignore', true)
}); });
const on = { const on = {
onClosed: () => { onClosed: () => {