diff --git a/winit/src/program.rs b/winit/src/program.rs index a51f4fd772..66f359f441 100644 --- a/winit/src/program.rs +++ b/winit/src/program.rs @@ -754,6 +754,7 @@ async fn run_instance
( action, &program, &mut compositor, + &mut events, &mut messages, &mut clipboard, &mut control_sender, @@ -1161,6 +1162,7 @@ fn run_action
(
action: Action (
window::Action::Close(id, channel) => {
let _ = window_manager.remove(id);
let _ = ui_caches.remove(&id);
-
let _ = channel.send(id);
+
+ events.push((
+ id,
+ core::Event::Window(core::window::Event::Closed),
+ ));
}
window::Action::GetOldest(channel) => {
let id =