Skip to content

Commit

Permalink
fix: exit full screen before hiding window (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
KarasuShin committed Sep 11, 2024
1 parent c4202a1 commit bd5b08f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,14 @@ export const createMainWindow = () => {
window.on("close", (event) => {
if (isMacOS) {
event.preventDefault()
window.hide()
if (window.isFullScreen()) {
window.once("leave-full-screen", () => {
window.hide()
})
window.setFullScreen(false)
} else {
window.hide()
}

callGlobalContextMethod(window, "electronClose")
} else {
Expand Down

0 comments on commit bd5b08f

Please sign in to comment.