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
This commit is contained in:
IceSentry 2025-05-26 15:26:26 -04:00 committed by François Mockers
parent d0ed3ab379
commit 41178347c1

View File

@ -110,8 +110,9 @@ struct WinitAppRunnerState<T: Event> {
impl<T: Event> WinitAppRunnerState<T> { impl<T: Event> WinitAppRunnerState<T> {
fn new(mut app: App) -> Self { fn new(mut app: App) -> Self {
app.add_event::<T>();
#[cfg(feature = "custom_cursor")] #[cfg(feature = "custom_cursor")]
app.add_event::<T>().init_resource::<CustomCursorCache>(); app.init_resource::<CustomCursorCache>();
let event_writer_system_state: SystemState<( let event_writer_system_state: SystemState<(
EventWriter<WindowResized>, EventWriter<WindowResized>,