mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 10:38:55 +00:00
Fix #462 - When minimized to tray and single-instance, re-running the app should activate and focus it (#490)
This commit is contained in:
parent
2b377a7916
commit
8963544afa
@ -122,7 +122,9 @@ if (appArgs.singleInstance) {
|
|||||||
const shouldQuit = app.makeSingleInstance(() => {
|
const shouldQuit = app.makeSingleInstance(() => {
|
||||||
// Someone tried to run a second instance, we should focus our window.
|
// Someone tried to run a second instance, we should focus our window.
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
if (mainWindow.isMinimized()) {
|
if (!mainWindow.isVisible()) { // tray
|
||||||
|
mainWindow.show();
|
||||||
|
} if (mainWindow.isMinimized()) { // minimized
|
||||||
mainWindow.restore();
|
mainWindow.restore();
|
||||||
}
|
}
|
||||||
mainWindow.focus();
|
mainWindow.focus();
|
||||||
|
Loading…
Reference in New Issue
Block a user