bevy/crates/bevy_winit/src
Joshua Holmes df6e136ab0
Replace some !Send resources with thread_local! (#17730)
# Objective

Work for issue #17682 

What's in this PR:
* Removal of some `!Send` resources that Bevy uses internally
* Replaces `!Send` resources with `thread_local!` static

What this PR does not cover:
* The ability to create `!Send` resources still exists
* Tests that test `!Send` resources are present (and should not be
removed until the ability to create `!Send` resources is removed)
* The example `log_layers_ecs` still uses a `!Send` resource. In this
example, removing the `!Send` resource results in the system that uses
it running on a thread other than the main thread, which doesn't work
with lazily initialized `thread_local!` static data. Removing this
`!Send` resource will need to be deferred until the System API is
extended to support configuring which thread the System runs on. Once an
issue for this work is created, it will be mentioned in #17667

Once the System API is extended to allow control of which thread the
System runs on, the rest of the `!Send` resources can be removed in a
different PR.
2025-03-04 07:48:02 +00:00
..
accessibility.rs Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
converters.rs Expose text field from winit in KeyboardInput (#16864) 2024-12-17 22:42:54 +00:00
cursor.rs Automatically transform cursor hotspot user asks to flip cursor image (#17540) 2025-01-28 05:49:46 +00:00
custom_cursor.rs Allowed creating uninitialized images (for use as storage textures) (#17760) 2025-02-10 22:22:07 +00:00
lib.rs Replace some !Send resources with thread_local! (#17730) 2025-03-04 07:48:02 +00:00
state.rs Replace some !Send resources with thread_local! (#17730) 2025-03-04 07:48:02 +00:00
system.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00
winit_config.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
winit_monitors.rs Move Resource trait to its own file (#17469) 2025-01-21 19:47:08 +00:00
winit_windows.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00