feat(core): updated to new browser engine

This commit is contained in:
Alexey Kasyanchuk
2018-12-09 15:51:24 +03:00
parent 23e2871669
commit a43f7431dd
4 changed files with 3232 additions and 6719 deletions

View File

@ -126,7 +126,12 @@ if(portative)
// handle promise rejections
process.on('unhandledRejection', r => logTE('system', 'Rejection:', r));
const shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
const gotTheLock = app.requestSingleInstanceLock()
if (!gotTheLock) {
logT('app', 'closed because of second application')
app.exit(0);
} else {
app.on('second-instance', (event, commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
logT('app', 'openned second application, just focus this one')
if (mainWindow) {
@ -134,11 +139,7 @@ const shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory
mainWindow.restore();
mainWindow.focus();
}
});
if (shouldQuit) {
logT('app', 'closed because of second application')
app.exit(0);
})
}
// log autoupdate