Produce window::Event::Closed on window::close
This commit is contained in:
parent
01aa84e41a
commit
22fc5ce0ea
1 changed files with 7 additions and 1 deletions
|
|
@ -754,6 +754,7 @@ async fn run_instance<P, C>(
|
||||||
action,
|
action,
|
||||||
&program,
|
&program,
|
||||||
&mut compositor,
|
&mut compositor,
|
||||||
|
&mut events,
|
||||||
&mut messages,
|
&mut messages,
|
||||||
&mut clipboard,
|
&mut clipboard,
|
||||||
&mut control_sender,
|
&mut control_sender,
|
||||||
|
|
@ -1161,6 +1162,7 @@ fn run_action<P, C>(
|
||||||
action: Action<P::Message>,
|
action: Action<P::Message>,
|
||||||
program: &P,
|
program: &P,
|
||||||
compositor: &mut C,
|
compositor: &mut C,
|
||||||
|
events: &mut Vec<(window::Id, core::Event)>,
|
||||||
messages: &mut Vec<P::Message>,
|
messages: &mut Vec<P::Message>,
|
||||||
clipboard: &mut Clipboard,
|
clipboard: &mut Clipboard,
|
||||||
control_sender: &mut mpsc::UnboundedSender<Control>,
|
control_sender: &mut mpsc::UnboundedSender<Control>,
|
||||||
|
|
@ -1212,8 +1214,12 @@ fn run_action<P, C>(
|
||||||
window::Action::Close(id, channel) => {
|
window::Action::Close(id, channel) => {
|
||||||
let _ = window_manager.remove(id);
|
let _ = window_manager.remove(id);
|
||||||
let _ = ui_caches.remove(&id);
|
let _ = ui_caches.remove(&id);
|
||||||
|
|
||||||
let _ = channel.send(id);
|
let _ = channel.send(id);
|
||||||
|
|
||||||
|
events.push((
|
||||||
|
id,
|
||||||
|
core::Event::Window(core::window::Event::Closed),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
window::Action::GetOldest(channel) => {
|
window::Action::GetOldest(channel) => {
|
||||||
let id =
|
let id =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue