diff --git a/winit/src/program.rs b/winit/src/program.rs
index 8e3563f7..62f8b6af 100644
--- a/winit/src/program.rs
+++ b/winit/src/program.rs
@@ -200,20 +200,22 @@ where
Runtime::new(executor, proxy.clone())
};
- let (application, task) = runtime.enter(|| P::new(flags));
+ let (program, task) = runtime.enter(|| P::new(flags));
if let Some(stream) = task.into_stream() {
runtime.run(stream);
}
+ runtime.track(program.subscription().map(Action::Output).into_recipes());
+
let (boot_sender, boot_receiver) = oneshot::channel();
let (event_sender, event_receiver) = mpsc::unbounded();
let (control_sender, control_receiver) = mpsc::unbounded();
let instance = Box::pin(run_instance::
(
- application,
+ program,
runtime,
- proxy,
+ proxy.clone(),
debug,
boot_receiver,
event_receiver,
@@ -226,18 +228,19 @@ where
instance: std::pin::Pin>,
context: task::Context<'static>,
id: Option,
- boot: Option>,
- sender: mpsc::UnboundedSender>,
+ boot: Option>,
+ sender: mpsc::UnboundedSender>>,
receiver: mpsc::UnboundedReceiver,
error: Option,
#[cfg(target_arch = "wasm32")]
is_booted: std::rc::Rc>,
#[cfg(target_arch = "wasm32")]
- queued_events: Vec>,
+ queued_events: Vec>>,
}
- struct BootConfig {
+ struct BootConfig {
+ proxy: Proxy,
sender: oneshot::Sender>,
window_settings: Option,
graphics_settings: graphics::Settings,
@@ -248,6 +251,7 @@ where
context,
id: settings.id,
boot: Some(BootConfig {
+ proxy,
sender: boot_sender,
window_settings,
graphics_settings,
@@ -262,14 +266,16 @@ where
queued_events: Vec::new(),
};
- impl winit::application::ApplicationHandler
+ impl winit::application::ApplicationHandler>
for Runner
where
+ Message: std::fmt::Debug,
F: Future