From 17eda55036cfc0c5db61df6387550ebc39a9ce5c Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Mon, 26 Sep 2016 12:40:11 -0300 Subject: [PATCH] Fixed start minimized bug on macOS If user had start minimized preference activated, when Rambox is opened the user cannot show window by clicking the dock icon. --- electron/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/electron/main.js b/electron/main.js index 4bed4c1d..441ed2cb 100644 --- a/electron/main.js +++ b/electron/main.js @@ -402,12 +402,14 @@ app.on('window-all-closed', function () { } }); +// Only macOS: On OS X it's common to re-create a window in the app when the +// dock icon is clicked and there are no other windows open. app.on('activate', function () { - // On OS X it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. if (mainWindow === null && mainMasterPasswordWindow === null ) { config.get('master_password') ? createMasterPasswordWindow() : createWindow(); } + + if ( mainWindow !== null ) mainWindow.show(); }); app.on('before-quit', function () {