fix multiwindow due to mounts not dropping in virtualdom (#4351)

* fix handlers not dropping thanks to mounts

* use `desktop`

* Add tasks and effects

* only destroy on virtualdom destroy

* fix clippy
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-07-01 20:49:45 -07:00
1 parent ff762cec84
commit 1db4b2a13d
3 files changed
+16 -7

No files matched your search

+1 -7
View File
@@ -8,16 +8,10 @@
use dioxus::desktop::tao::event::Event as WryEvent;
use dioxus::desktop::tao::event::WindowEvent;
use dioxus::desktop::use_wry_event_handler;
use dioxus::desktop::{Config, DefaultWindowCloseBehaviour};
use dioxus::prelude::*;
fn main() {
dioxus::LaunchBuilder::desktop()
.with_cfg(
Config::new()
.with_default_window_close_behaviour(DefaultWindowCloseBehaviour::WindowsCloses),
)
.launch(app)
dioxus::launch(app);
}
fn app() -> Element {