From d86983233833391f95f137a76f5d451b7eff62a3 Mon Sep 17 00:00:00 2001 From: fortime Date: Fri, 7 Mar 2025 16:46:17 +0800 Subject: [PATCH] feat(multi_window): send `iced::window::Event::Closed`. Signed-off-by: fortime --- iced_layershell/src/multi_window.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iced_layershell/src/multi_window.rs b/iced_layershell/src/multi_window.rs index cf09d4a..310d917 100644 --- a/iced_layershell/src/multi_window.rs +++ b/iced_layershell/src/multi_window.rs @@ -919,6 +919,11 @@ async fn run_instance( &mut window_manager, cached_user_interfaces, )); + runtime.broadcast(iced_futures::subscription::Event::Interaction { + window: id, + event: Event::Window(window::Event::Closed), + status: iced_core::event::Status::Ignored, + }); // if now there is no windows now, then break the compositor, and unlink the clipboard if window_manager.is_empty() { compositor = None;