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

Is it necessary to destroy window when dropping wry::webview::WebView ? #608

Closed
bg5hfc opened this issue Jun 14, 2022 · 4 comments
Closed

Comments

@bg5hfc
Copy link
Contributor

bg5hfc commented Jun 14, 2022

I noticed that the WebView struct implements the Drop trait, and a destroy method is called on window when the webview drops(in wry/src/webview/mod.rs).

Is it really necessay because tao::Window has already do the destruction properly on both Linux/mac and Windows platform.

I'm asking this because I wanna build a window with multiple WebViews on it (something like the browser with many tabs), but the Drop trait of WebView hinders me.

@wusyong
Copy link
Member

wusyong commented Jun 14, 2022

We stick to one window with one webview for simplicity.
We can evaluate multiple webviews support.

@keiya01
Copy link
Member

keiya01 commented Jun 14, 2022

I agree.
I think window sould be dropped myself in tao layer.

@keiya01
Copy link
Member

keiya01 commented Jun 17, 2022

If we need to drop window in wry, I think we need to check if window has multi webview🤔

@amrbashir
Copy link
Member

As it stated above, our current api is towards one window with one webview. I am gonna close this as duplicate of #677 as it will be the same fix in the future.

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2022
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

4 participants