add reserved Id
This commit is contained in:
parent
64ef6b2724
commit
8fb1e21873
1 changed files with 7 additions and 4 deletions
|
|
@ -198,7 +198,13 @@ where
|
|||
let task = if let Some(window_settings) = window_settings {
|
||||
let mut task = Some(task);
|
||||
|
||||
let (_id, open) = runtime::window::open(window_settings);
|
||||
let open = iced_runtime::task::oneshot(|channel| {
|
||||
iced_runtime::Action::Window(iced_runtime::window::Action::Open(
|
||||
iced_runtime::core::window::Id::RESERVED,
|
||||
window_settings,
|
||||
channel,
|
||||
))
|
||||
});
|
||||
|
||||
open.then(move |_| task.take().unwrap_or(Task::none()))
|
||||
} else {
|
||||
|
|
@ -357,9 +363,6 @@ where
|
|||
return;
|
||||
};
|
||||
|
||||
// XXX what to do if the program is a daemon?
|
||||
// Can we avoid creating a useless window that hangs around forever?
|
||||
|
||||
let window: Arc<dyn winit::window::Window> = match event_loop
|
||||
.create_window(
|
||||
winit::window::WindowAttributes::default()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue