From f0c36b548a001616c1551f758f009bc6fba1530d Mon Sep 17 00:00:00 2001 From: mohandast52 Date: Thu, 23 May 2024 17:48:49 +0530 Subject: [PATCH] chore: add activate event listener --- electron/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/electron/main.js b/electron/main.js index df500f4f..adb3871d 100644 --- a/electron/main.js +++ b/electron/main.js @@ -220,6 +220,14 @@ const createMainWindow = () => { mainWindow.minimize(); }); + app.on('activate', () => { + if (mainWindow.isMinimized()) { + mainWindow.restore(); + } else { + mainWindow.show(); + } + }); + ipcMain.on('set-height', (_event, height) => { mainWindow.setSize(width, height); });