Exit runtime with control_sender instead of break
This commit is contained in:
parent
faa5d0c58d
commit
2eea9b81e4
1 changed files with 6 additions and 2 deletions
|
|
@ -661,7 +661,7 @@ async fn run_instance<P, C>(
|
||||||
|
|
||||||
debug.startup_finished();
|
debug.startup_finished();
|
||||||
|
|
||||||
'main: while let Some(event) = event_receiver.next().await {
|
while let Some(event) = event_receiver.next().await {
|
||||||
match event {
|
match event {
|
||||||
Event::WindowCreated {
|
Event::WindowCreated {
|
||||||
id,
|
id,
|
||||||
|
|
@ -929,7 +929,11 @@ async fn run_instance<P, C>(
|
||||||
&& window_id != boot_window
|
&& window_id != boot_window
|
||||||
&& window_manager.is_empty()
|
&& window_manager.is_empty()
|
||||||
{
|
{
|
||||||
break 'main;
|
control_sender
|
||||||
|
.start_send(Control::Exit)
|
||||||
|
.expect("Send control action");
|
||||||
|
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let Some((id, window)) =
|
let Some((id, window)) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue