Skip to content

Commit 7e8aa83

Browse files
second-instance electron fixed.
1 parent 95b373b commit 7e8aa83

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

electron/main/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,9 @@ if (!gotTheLock) {
328328
if (electronCache.win.isMinimized()) {
329329
electronCache.win.restore();
330330
}
331+
electronCache.win?.show();
331332
electronCache.win?.focus();
333+
appShow.change(true);
332334
}
333335
});
334336

@@ -392,7 +394,9 @@ app.on('second-instance', () => {
392394
if (electronCache.win) {
393395
// Focus on the main window if the user tried to open another
394396
if (electronCache.win.isMinimized()) electronCache.win.restore();
397+
electronCache.win.show();
395398
electronCache.win.focus();
399+
appShow.change(true);
396400
}
397401
});
398402

0 commit comments

Comments
 (0)