Multiple instances open multiple instances
See original GitHub issueI’m trying to implement an app that allows multiple instance to open. Each window is the same app pointing to index.html. I’m using App.on(“open”) to open new instances like the spec:
nw.App.on("open", function(args)
{
nw.Window.open("index.html", { new_instance: true });
});
This causes each instance to listen for the open event. Instead of getting just 1 new window, each instance opens it’s own new window, leading to “Window Madness”.
I imagine most apps make the “main window” special, and be the only listener, but that doesn’t work. If the user closes the first window, the application will no longer open new instances.
Is this a bug, or a feature oversight? How can I get my application to open just 1 new window when they already have 3 or 4 instances already open?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to Run Multiple Versions of the Same Program on Windows
Now, hold Shift while you right-click on the icon of the program. This will open a context menu with more options than usual....
Read more >How to Run Multiple Instances of a Windows Program - Hongkiat
To open another window of a program, simply launch it again. An easier way to do this is to press and hold the...
Read more >Windows 11 opening multiple instances of same application
How do I force Win 11 to open only 1 instance of an app when I select it's icon from the toolbar or...
Read more >Is it possible to open multiple instances of the application at ...
It is not possible to open "multiple instances" of Connexion Client 3.x / Running multiple Connexion windows at the same time.
Read more >How to Run Multiple Instances of a Windows Program
How to Run Multiple Instances of a Windows Program · 1. Just Relaunch the Program · 2. Launch Using Run Box in Windows...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was also facing this problem. I got around it by:
main
field in thepackage.json
from myindex.html
file to a newmain.js
file:main.js
file:index.html
file.Just a note that the above doesn’t quite work as expected. This is visible when using adding a tray icon. Only one tray icon will be visible. There are other issues such as the inability to open more instances after closing the 2nd opened instance.