Added close behaviour option for specific window (#3754)

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
KlemenandJonathan Kelley authored and GitHub committed 2025-07-01 18:59:44 -07:00
1 parent c3c7e5f705
commit 9573af115a
10 files changed
+172 -28

No files matched your search

+5 -2
View File
@@ -8,12 +8,15 @@
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, WindowCloseBehaviour};
use dioxus::desktop::{Config, DefaultWindowCloseBehaviour};
use dioxus::prelude::*;
fn main() {
dioxus::LaunchBuilder::desktop()
.with_cfg(Config::new().with_close_behaviour(WindowCloseBehaviour::CloseWindow))
.with_cfg(
Config::new()
.with_default_window_close_behaviour(DefaultWindowCloseBehaviour::WindowsCloses),
)
.launch(app)
}