Browse Source

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.
pull/367/head
Ramiro Saenz 9 years ago
parent
commit
17eda55036
  1. 6
      electron/main.js

6
electron/main.js

@ -402,12 +402,14 @@ app.on('window-all-closed', function () {
} }
}); });
app.on('activate', function () { // Only macOS: On OS X it's common to re-create a window in the app when the
// 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. // dock icon is clicked and there are no other windows open.
app.on('activate', function () {
if (mainWindow === null && mainMasterPasswordWindow === null ) { if (mainWindow === null && mainMasterPasswordWindow === null ) {
config.get('master_password') ? createMasterPasswordWindow() : createWindow(); config.get('master_password') ? createMasterPasswordWindow() : createWindow();
} }
if ( mainWindow !== null ) mainWindow.show();
}); });
app.on('before-quit', function () { app.on('before-quit', function () {

Loading…
Cancel
Save