bevy/examples/window
Mike cfcb56f5b9
Remove need for EventLoopProxy to be NonSend (#14198)
# Objective

- Continue to pare down the uses on NonSend resources in the engine. In
this case, EventLoopProxy used to be `!Sync`, but is now `Sync` in the
latest version of winit.

## Solution

- New type `EventLoopProxy` as `EventLoopProxyWrapper` to make it into a
normal resource.
- Update the `custom_user_event` example as it no longer needs to
indirectly access the `EventLoopProxy` through a static variable
anymore.

## Testing

- Ran the example. The resource exists just for users to use, so there
aren't any in engine uses for it currently.

---

## Changelog

- make EventLoopProxy into a regular resource. 

## Migration Guide

`EventLoopProxy` has been renamed to `EventLoopProxyWrapper` and is now
`Send`, making it an ordinary resource.

Before:
```rust
event_loop_system(event_loop: NonSend<EventLoopProxy<MyEvent>>) {
    event_loop.send_event(MyEvent);
}
```

After:
```rust
event_loop_system(event_loop: Res<EventLoopProxy<MyEvent>>) {
    event_loop.send_event(MyEvent);
}
```
2024-07-16 06:59:01 +00:00
..
clear_color.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
custom_user_event.rs Remove need for EventLoopProxy to be NonSend (#14198) 2024-07-16 06:59:01 +00:00
low_power.rs Remove need for EventLoopProxy to be NonSend (#14198) 2024-07-16 06:59:01 +00:00
multiple_windows.rs glTF labels: add enum to avoid misspelling and keep up-to-date list documented (#13586) 2024-05-31 23:25:57 +00:00
scale_factor_override.rs fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00
screenshot.rs Updates default Text font size to 24px (#13603) 2024-05-31 16:41:27 +00:00
transparent_window.rs Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
window_resizing.rs Update winit dependency to 0.29 (#10702) 2023-12-21 07:40:47 +00:00
window_settings.rs Fix fit_canvas_to_parent (#11278) 2024-03-03 14:33:30 +00:00