This commit is contained in:
Semyon Pisarev 2016-12-26 12:51:59 +03:00
parent 5479947e52
commit 71c5c7ad40
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ var mainWindow = null,
appIcon = null,
openFile = process.argv.filter(arg => /\.kdbx$/i.test(arg))[0],
ready = false,
appReady = false,
restartPending = false,
mainWindowPosition = {},
updateMainWindowPositionTimeout = null,
@ -41,6 +42,7 @@ app.on('window-all-closed', () => {
});
app.on('ready', () => {
if (!checkSingleInstance()) {
appReady = true;
setAppOptions();
createMainWindow();
setGlobalShortcuts();
@ -54,7 +56,7 @@ app.on('open-file', (e, path) => {
});
app.on('activate', () => {
if (process.platform === 'darwin') {
if (!mainWindow) {
if (appReady && !mainWindow) {
createMainWindow();
}
}