Skip to content

Commit

Permalink
🐛 fix: 修复mac激活时,窗口事件报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiu-Jun committed Aug 20, 2024
1 parent 75e1bb2 commit f0de900
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Description:
* @Date: 2023-03-11 00:47:21
* @LastEditors: June
* @LastEditTime: 2023-11-08 11:38:58
* @LastEditTime: 2024-08-20 15:05:09
*/
import { app, BrowserWindow } from 'electron'
import initTray from './modules/tray/index'
Expand All @@ -21,7 +21,7 @@ let win: any = null
function startApp() {
// 返回false 说明已有应用了

if (!getLock) {
if (!getLock && process.platform === 'win32') {
win?.isMinimized() && win?.restore()
win?.focus()
}
Expand Down Expand Up @@ -59,8 +59,6 @@ function startApp() {

// // 客户端失去焦点
// app.on('browser-window-blur', () => { })

app.on('activate', () => win?.show())
}

startApp()
Expand Down

0 comments on commit f0de900

Please sign in to comment.