fix(electron): close app while on fullscreen should be minimize instead (#6534)
This commit is contained in:
@@ -127,7 +127,14 @@ async function createWindow(additionalArguments: string[]) {
|
|||||||
// - all browser windows will capture the "close" event
|
// - all browser windows will capture the "close" event
|
||||||
// - the hidden window will close all windows
|
// - the hidden window will close all windows
|
||||||
// - "window-all-closed" event will be emitted and eventually quit the app
|
// - "window-all-closed" event will be emitted and eventually quit the app
|
||||||
|
if (browserWindow.isFullScreen()) {
|
||||||
|
browserWindow.once('leave-full-screen', () => {
|
||||||
browserWindow.hide();
|
browserWindow.hide();
|
||||||
|
});
|
||||||
|
browserWindow.setFullScreen(false);
|
||||||
|
} else {
|
||||||
|
browserWindow.hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
helperConnectionUnsub?.();
|
helperConnectionUnsub?.();
|
||||||
helperConnectionUnsub = undefined;
|
helperConnectionUnsub = undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user