From 41178347c14ef5297741b1a8af10bba7bbe35647 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 33ad693c5a..378426d968 100644 --- a/crates/bevy_winit/src/state.rs +++ b/crates/bevy_winit/src/state.rs @@ -110,8 +110,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,