Fix window not re-showing on MacOS

This commit is contained in:
Keith Maika 2021-02-13 12:07:22 -05:00
parent ff0bf695a8
commit 4c6ce2e905
1 changed files with 5 additions and 3 deletions

View File

@ -152,9 +152,11 @@ app.on('window-all-closed', function () {
}) })
app.on('activate', function () { app.on('activate', function () {
// On macOS it's common to re-create a window in the app when the if (mainWindow === null){
// dock icon is clicked and there are no other windows open. createWindow()
if (mainWindow === null) createWindow() } else {
mainWindow.show();
}
}) })
// In this file you can include the rest of your app's specific main process // In this file you can include the rest of your app's specific main process