feat(core): updated to new browser engine
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user