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

Fixed the multiple window closing issue, where the two multiwindow examples weren't working. #3499

Merged
merged 9 commits into from
Jan 13, 2025

Conversation

sertschgi
Copy link
Contributor

@sertschgi sertschgi commented Jan 4, 2025

This was due to the tao window instance not being dropped. Furthermore the whole desktop context should have been dropped but wasn't due to the Rc that had 3 strong references too many because of copying in webview::new. I replaced everything with weak pointers so that the desktop context has 1 strong reference to the app, so that it is dropped when it is removed from the app.webviews hashmap.

Fixes #3542
Fixes #3113
Fixes #3342

@jkelleyrtp jkelleyrtp added this to the 0.6.2 milestone Jan 9, 2025
@jkelleyrtp
Copy link
Member

Thanks for the PR! I made some tweaks to track down where exactly the hardcounts are being held and then rolled in the fixes from #3466.

The hardcount increments came from a circular dependency in virtualdom -> window via the Document and WebviewEdits objects which should be fixed now.

@jkelleyrtp jkelleyrtp merged commit 25a64d9 into DioxusLabs:main Jan 13, 2025
2 checks passed
@CryZe
Copy link
Contributor

CryZe commented Jan 13, 2025

I do not believe #3542 got fixed. It still does not work on main (to be clear, the issue had nothing to do with any closing behavior, the window is broken from the start).

@Klemen2
Copy link
Contributor

Klemen2 commented Jan 13, 2025

#3542 was not fixed since the problem is with creating a window without async in onclick events - that's why I changed the multiwindow example to use async in #3466, #3342 uses use_after_render to create a window which works.

@jkelleyrtp
Copy link
Member

I do not believe #3542 got fixed. It still does not work on main (to be clear, the issue had nothing to do with any closing behavior, the window is broken from the start).

Ah sorry about that, I misread that issue and assumed it was a duplicate of another issue.

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