Skip to content

Commit

Permalink
makeSingleInstance isn't a thing any more
Browse files Browse the repository at this point in the history
  • Loading branch information
niik committed May 9, 2018
1 parent 16b5b2b commit f2edf6b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test-smoke/electron/test/main.ts
Expand Up @@ -45,15 +45,9 @@ app.on("window-all-closed", () => {
});

// Check single instance app
const 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();
}
});
const primaryInstance = app.requestSingleInstanceLock();

if (shouldQuit) {
if (!primaryInstance) {
app.quit();
process.exit(0);
}
Expand Down

0 comments on commit f2edf6b

Please sign in to comment.