Skip to content

Commit

Permalink
chore: add activate event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
mohandast52 committed May 23, 2024
1 parent d69abc8 commit f0c36b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit f0c36b5

Please sign in to comment.