Skip to content

Commit

Permalink
fix: window not maximizing on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
amitojsingh366 committed Apr 15, 2021
1 parent 195ecd9 commit 9571d87
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion baklava/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dogehouse",
"version": "1.0.55",
"version": "1.0.56",
"description": "Taking voice conversations to the moon 🚀",
"main": "./dist/electron.js",
"scripts": {
Expand Down
16 changes: 11 additions & 5 deletions baklava/src/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,17 @@ function createMainWindow() {
mainWindow.close();
});
ipcMain.on("@app/maximize", (event, args) => {
if (mainWindow.maximizable) {
if (mainWindow.isMaximized()) {
mainWindow.unmaximize();
} else {
mainWindow.maximize();
if (isMac) {
if (mainWindow.isFullScreenable()) {
mainWindow.setFullScreen(!mainWindow.isFullScreen());
}
} else {
if (mainWindow.maximizable) {
if (mainWindow.isMaximized()) {
mainWindow.unmaximize();
} else {
mainWindow.maximize();
}
}
}
});
Expand Down

1 comment on commit 9571d87

@vercel
Copy link

@vercel vercel bot commented on 9571d87 Apr 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.