Skip to content

Commit

Permalink
fix minimize
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanzilla committed Dec 6, 2024
1 parent c893096 commit 8e4d4a1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,13 @@ async function createWindow() {

mainWindow?.setMenu(null);

mainWindow?.on("minimize", (event: { preventDefault: () => void }) => {
event.preventDefault();
mainWindow?.minimize();
mainWindow?.on("minimize", () => {
if (mainWindow?.isMinimized()) {
mainWindow?.minimize();

if (process.platform === "darwin") {
app.dock.hide();
if (process.platform === "darwin") {
app.dock.hide();
}
}
});

Expand Down

0 comments on commit 8e4d4a1

Please sign in to comment.