Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many Windows after macOS restart #7516

Closed
theDevelopper opened this issue Jul 2, 2020 · 3 comments
Closed

Too many Windows after macOS restart #7516

theDevelopper opened this issue Jul 2, 2020 · 3 comments
Assignees

Comments

@theDevelopper
Copy link

NWJS Version : 0.46.3
Operating System : macOS 10.15.5 (latest Catalina)

Expected behaviour

I have an NWJS App running and this App has one visible main window with id and a hidden one with new_instance: true and an id. When restarting the OS with the option to reopen current apps then I expect to have the App opened with one visible main window.

Actual behaviour

When restarting the OS with the option to reopen current apps then I actually see three windows. The main window is there twice (overlaying each other) and the initially hidden window is visible. I assume there is a fourth hidden one.

It looks like the "old" windows are recreated and a new main one started.

How to reproduce

Code:
mac-restart-issue-examle.zip

I have 2 html files. One for the visible window and one for the hidden one. The hidden one is created with JS like this:

nw.Window.open('hidden.html', {
	id: 'hidden',
	show: false,
	new_instance: true,
});

I then download the latest nwjs form the website and put the code inside the nw.app folder and start the app. I see one window as expected. I then restart macOS and I see three windows - how unexpected.

Last time I used this setup was version 0.41.3 and it worked as expected. So somewhere along the line it broke which prevents me form upgrading nwjs.

@theDevelopper
Copy link
Author

any updates on this bug?

@theDevelopper
Copy link
Author

adding --disable-features=nw2 to the chromium-args seems to fix the issue for me. But that means it is blocker for the nw1 removal. (#7230)

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants