修复最小化托盘时再次运行程序时无法恢复窗口显示的问题
This commit is contained in:
parent
be84bd27d3
commit
456fdc0fca
@ -8,8 +8,13 @@ if (!app.requestSingleInstanceLock()) {
|
||||
}
|
||||
app.on('second-instance', (event, argv, cwd) => {
|
||||
if (mainWindow) {
|
||||
if (mainWindow.isMinimized()) mainWindow.restore()
|
||||
mainWindow.focus()
|
||||
if (mainWindow.isMinimized()) {
|
||||
mainWindow.restore()
|
||||
} else if (mainWindow.isVisible()) {
|
||||
mainWindow.focus()
|
||||
} else {
|
||||
mainWindow.show()
|
||||
}
|
||||
} else {
|
||||
app.quit()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user