diff --git a/src/main/window.ts b/src/main/window.ts index 6acc6bf60..f35753503 100644 --- a/src/main/window.ts +++ b/src/main/window.ts @@ -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 {