mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-03 18:43:17 +03:00
fix(electron): close app while on fullscreen should be minimize instead (#6534)
This commit is contained in:
parent
e1eb925704
commit
6fe0c4be6c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user