diff options
author | 2024-06-20 22:28:28 +0200 | |
---|---|---|
committer | 2024-06-20 22:28:28 +0200 | |
commit | 50dd2a6cc03fdc184b7a9fb0f7a659952a742a79 (patch) | |
tree | f54a1cea58076526c962e304babfe40a9330eaa6 /winit | |
parent | cbeda38f0d49f184ff26b7f77a4246b33ea3bd90 (diff) | |
download | iced-50dd2a6cc03fdc184b7a9fb0f7a659952a742a79.tar.gz iced-50dd2a6cc03fdc184b7a9fb0f7a659952a742a79.tar.bz2 iced-50dd2a6cc03fdc184b7a9fb0f7a659952a742a79.zip |
Fix `application` sometimes exiting at startup
Diffstat (limited to 'winit')
-rw-r--r-- | winit/src/program.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winit/src/program.rs b/winit/src/program.rs index 2e7945ac..9bb3fa21 100644 --- a/winit/src/program.rs +++ b/winit/src/program.rs @@ -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; |