mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 23:09:11 +02:00
re-show window of app if re-run
This commit is contained in:
parent
12bb2c1b7a
commit
2ed7d47938
1 changed files with 16 additions and 0 deletions
|
@ -73,6 +73,22 @@ app.on('activate', function(){
|
|||
}
|
||||
})
|
||||
|
||||
var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
|
||||
// Someone tried to run a second instance, we should focus our window
|
||||
if (mainWindow) {
|
||||
if (mainWindow.isMinimized()) {
|
||||
mainWindow.restore();
|
||||
}
|
||||
mainWindow.focus();
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
if (shouldQuit) {
|
||||
app.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
// Check command line arguments to see how to find binaries
|
||||
var argv = require('yargs').argv;
|
||||
var pathFinder = require('./modules/path-finder.js');
|
||||
|
|
Loading…
Reference in a new issue