Skip to content

Commit

Permalink
Merge pull request #86 from neilenns/neilenns/issue84
Browse files Browse the repository at this point in the history
Enable switching to mini-mode when window is maximized
  • Loading branch information
pierr3 authored Jun 3, 2024
2 parents fcf61b1 + 615e19a commit 61fa563
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ const toggleMiniMode = () => {
return;
}

// Issue 84: If the window is maximized it has to be unmaximized before
// setting the window size to mini-mode otherwise nothing happens.
if (mainWindow.isMaximized()) {
mainWindow.unmaximize();
}

savedLastWindowSize.width = mainWindow.getSize()[0];
savedLastWindowSize.height = mainWindow.getSize()[1];

Expand Down

0 comments on commit 61fa563

Please sign in to comment.