From 2dc63378750438a880e1f38b2c80c6625833166a Mon Sep 17 00:00:00 2001 From: IceSentry Date: Mon, 26 May 2025 15:26:26 -0400 Subject: [PATCH] Add WakeUp event to App (#19212) # Objective - The WakeUp event is never added to the app. If you need to use that event you currently need to add it yourself. ## Solution - Add the WakeUp event to the App in the WinitPlugin ## Testing - I tested the window_setting example and it compiled and worked --- crates/bevy_winit/src/state.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bevy_winit/src/state.rs b/crates/bevy_winit/src/state.rs index 1855539cc5..083341fd2b 100644 --- a/crates/bevy_winit/src/state.rs +++ b/crates/bevy_winit/src/state.rs @@ -108,8 +108,9 @@ struct WinitAppRunnerState { impl WinitAppRunnerState { fn new(mut app: App) -> Self { + app.add_event::(); #[cfg(feature = "custom_cursor")] - app.add_event::().init_resource::(); + app.init_resource::(); let event_writer_system_state: SystemState<( EventWriter,