fix: 🐛 Mac os window lifecycle (#1067)
This commit is contained in:
1 parent
1071241604
commit
ccde5e88da
1 file changed
+12
@@ -222,6 +222,18 @@ app.on('ready', async () => {
|
||||
|
||||
// Check for updates on launch
|
||||
appUpdater.run({ suppressNoUpdatePrompt: true });
|
||||
|
||||
/**
|
||||
* Need for Mac OS behaviour of closing the window but not the app.
|
||||
* This allows to reopen the window if the user clicks Boundary icon in the dock
|
||||
* while the app is not close.
|
||||
* More info: https://www.electronjs.org/docs/latest/tutorial/quick-start#open-a-window-if-none-are-open-macos
|
||||
*/
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
mainWindow = createWindow(partition, closeWindowCB);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user