Fix application sometimes exiting at startup
This commit is contained in:
parent
cbeda38f0d
commit
50dd2a6cc0
1 changed files with 4 additions and 0 deletions
|
|
@ -305,6 +305,7 @@ where
|
|||
.send(Boot {
|
||||
compositor,
|
||||
clipboard,
|
||||
window: window.id(),
|
||||
is_daemon: window_settings.is_none(),
|
||||
})
|
||||
.ok()
|
||||
|
|
@ -592,6 +593,7 @@ where
|
|||
struct Boot<C> {
|
||||
compositor: C,
|
||||
clipboard: Clipboard,
|
||||
window: winit::window::WindowId,
|
||||
is_daemon: bool,
|
||||
}
|
||||
|
||||
|
|
@ -634,6 +636,7 @@ async fn run_instance<P, C>(
|
|||
let Boot {
|
||||
mut compositor,
|
||||
mut clipboard,
|
||||
window: boot_window,
|
||||
is_daemon,
|
||||
} = boot.try_recv().ok().flatten().expect("Receive boot");
|
||||
|
||||
|
|
@ -905,6 +908,7 @@ async fn run_instance<P, C>(
|
|||
window_event,
|
||||
winit::event::WindowEvent::Destroyed
|
||||
)
|
||||
&& window_id != boot_window
|
||||
&& window_manager.is_empty()
|
||||
{
|
||||
break 'main;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue