Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit c4f288c

Browse files
fix: unmaximize window is already maximized
1 parent b3c5785 commit c4f288c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ app
140140
mainWindow?.minimize();
141141
});
142142
ipcMain.on('maximizeApp', () => {
143-
mainWindow?.maximize();
143+
if (mainWindow?.isMaximized()) {
144+
mainWindow?.unmaximize();
145+
} else {
146+
mainWindow?.maximize();
147+
}
144148
});
145149
ipcMain.on('closeApp', () => {
146150
mainWindow?.close();

0 commit comments

Comments
 (0)