makeSingleInstance clarification
Removed callback return value from the sample code for makeSingleInstance because it appears to not be used for anything.
This commit is contained in:
parent
09b658b50a
commit
17603d5dfb
1 changed files with 1 additions and 2 deletions
|
@ -398,7 +398,7 @@ quit.
|
||||||
On OS X the system enforces single instance automatically when users try to open
|
On OS X the system enforces single instance automatically when users try to open
|
||||||
a second instance of your app in Finder, and the `open-file` and `open-url`
|
a second instance of your app in Finder, and the `open-file` and `open-url`
|
||||||
events will be emitted for that. However when users start your app in command
|
events will be emitted for that. However when users start your app in command
|
||||||
line the system's single instance machanism will be bypassed and you have to
|
line the system's single instance mechanism will be bypassed and you have to
|
||||||
use this method to ensure single instance.
|
use this method to ensure single instance.
|
||||||
|
|
||||||
An example of activating the window of primary instance when a second instance
|
An example of activating the window of primary instance when a second instance
|
||||||
|
@ -413,7 +413,6 @@ var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory)
|
||||||
if (myWindow.isMinimized()) myWindow.restore();
|
if (myWindow.isMinimized()) myWindow.restore();
|
||||||
myWindow.focus();
|
myWindow.focus();
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (shouldQuit) {
|
if (shouldQuit) {
|
||||||
|
|
Loading…
Reference in a new issue