Make maximize button reflect window state

This commit is contained in:
ProjectInfinity
2022-12-16 14:44:14 +01:00
parent 87c3b39ae9
commit 570cb2d96b
3 changed files with 13 additions and 1 deletions

View File

@@ -166,8 +166,10 @@ ipcMain.on('window-action', async (event, arg) => {
case 'maximize':
if (mainWindow.isMaximized()) {
mainWindow.unmaximize();
mainWindow.webContents.send('maximize', false);
} else {
mainWindow.maximize();
mainWindow.webContents.send('maximize', true);
}
break;
case 'close':