Skip to content

Commit

Permalink
Enable switching to mini-mode when in full screen
Browse files Browse the repository at this point in the history
Fixes #84
  • Loading branch information
neilenns committed Jun 2, 2024
1 parent 33dc76c commit 10770fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ const toggleMiniMode = () => {
mainWindow.setSize(savedLastWindowSize.width, savedLastWindowSize.height);
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 10770fd

Please sign in to comment.