修复某些情况下从托盘还原窗口后无法操作的问题
parent
798f5cd0a6
commit
f0dc76c7a4
|
@ -8,13 +8,14 @@ if (!app.requestSingleInstanceLock()) {
|
||||||
}
|
}
|
||||||
if (!global.modals) global.modals = {}
|
if (!global.modals) global.modals = {}
|
||||||
app.on('second-instance', (event, argv, cwd) => {
|
app.on('second-instance', (event, argv, cwd) => {
|
||||||
if (global.modals.mainWindow) {
|
if (global.modules.mainWindow) {
|
||||||
if (global.modals.mainWindow.isMinimized()) {
|
if (global.modules.mainWindow.isMinimized()) {
|
||||||
global.modals.mainWindow.restore()
|
global.modules.mainWindow.restore()
|
||||||
} else if (global.modals.mainWindow.isVisible()) {
|
}
|
||||||
global.modals.mainWindow.focus()
|
if (global.modules.mainWindow.isVisible()) {
|
||||||
|
global.modules.mainWindow.focus()
|
||||||
} else {
|
} else {
|
||||||
global.modals.mainWindow.show()
|
global.modules.mainWindow.show()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
app.quit()
|
app.quit()
|
||||||
|
|
Loading…
Reference in New Issue