From 22160ba59fde93e407818e2465c15d14aaa1d3a1 Mon Sep 17 00:00:00 2001 From: Gelaechter <30231932+gelaechter@users.noreply.github.com> Date: Sat, 1 Jul 2023 19:45:08 +0000 Subject: [PATCH] Show first instance when starting a second one (#149) --- src/main/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/main.ts b/src/main/main.ts index 2a153e97..c894d445 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -84,6 +84,10 @@ const singleInstance = app.requestSingleInstanceLock(); if (!singleInstance) { app.quit(); +} else { + app.on('second-instance', (_event, _argv, _workingDirectory) => { + mainWindow?.show(); + }); } const RESOURCES_PATH = app.isPackaged