Skip to content

Commit

Permalink
Allow hiding the window from full screen mode on macOS.
Browse files Browse the repository at this point in the history
Fixes #1187.
  • Loading branch information
enesonus authored and andersk committed Mar 22, 2024
1 parent 70f0170 commit 79f6f13
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,14 @@ function createMainWindow(): BrowserWindow {
event.preventDefault();

if (process.platform === "darwin") {
app.hide();
if (win.isFullScreen()) {
win.setFullScreen(false);
win.once("leave-full-screen", () => {
app.hide();
});
} else {
app.hide();
}
} else {
win.hide();
}
Expand Down

0 comments on commit 79f6f13

Please sign in to comment.