diff --git a/packages/frontend/electron/src/main/main-window.ts b/packages/frontend/electron/src/main/main-window.ts index ec7005d2d3..d4db3fd8bd 100644 --- a/packages/frontend/electron/src/main/main-window.ts +++ b/packages/frontend/electron/src/main/main-window.ts @@ -127,7 +127,14 @@ async function createWindow(additionalArguments: string[]) { // - all browser windows will capture the "close" event // - the hidden window will close all windows // - "window-all-closed" event will be emitted and eventually quit the app - browserWindow.hide(); + if (browserWindow.isFullScreen()) { + browserWindow.once('leave-full-screen', () => { + browserWindow.hide(); + }); + browserWindow.setFullScreen(false); + } else { + browserWindow.hide(); + } } helperConnectionUnsub?.(); helperConnectionUnsub = undefined;