Windows URI handling #121
1 changed files with 19 additions and 15 deletions
10
app/main.js
10
app/main.js
|
@ -193,7 +193,10 @@ function quitNow() {
|
|||
app.quit();
|
||||
}
|
||||
|
||||
const isSecondaryInstance = app.makeSingleInstance((argv) => {
|
||||
if (process.platform != 'linux') {
|
||||
// On Linux, this is always returning true due to an Electron bug,
|
||||
// so for now we just don't support single-instance apps on Linux.
|
||||
const isSecondaryInstance = app.makeSingleInstance((argv) => {
|
||||
if (win) {
|
||||
if (win.isMinimized()) {
|
||||
win.restore();
|
||||
|
@ -206,11 +209,12 @@ const isSecondaryInstance = app.makeSingleInstance((argv) => {
|
|||
} else if (argv.length >= 2) {
|
||||
openUri = denormalizeUri(argv[1]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
if (isSecondaryInstance) { // We're not in the original process, so quit
|
||||
if (isSecondaryInstance) { // We're not in the original process, so quit
|
||||
quitNow();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
app.on('ready', function(){
|
||||
|
|
Loading…
Reference in a new issue