Skip to content

Commit 860893f

Browse files
authored
fix: rebinding menu ipc when activate window (#24)
1 parent 36a1647 commit 860893f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

electron/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ const mainWindow = new MainWindow();
5858
// for applications and their menu bar to stay active until the user quits
5959
// explicitly with Cmd + Q.
6060
app.on("window-all-closed", () => {
61+
mainWindow.remove();
6162
if (!isMac) {
6263
app.quit();
63-
mainWindow.remove();
6464
}
6565
});
6666

@@ -69,6 +69,7 @@ app.on("activate", () => {
6969
// dock icon is clicked and there are no other windows open.
7070
if (BrowserWindow.getAllWindows().length === 0) {
7171
mainWindow.init();
72+
bindMenuIpc(mainWindow);
7273
}
7374
});
7475

0 commit comments

Comments
 (0)