bevy/crates/bevy_winit/src
François Mockers 519abbca11
make sure windows are dropped on main thread (#13686)
# Objective

- On macOS, closing a window by respawning its entity freezes

## Solution

- `WindowWrapper` is keeping an `Arc` of the window, to be able to
access it from the rendering thread. Winit windows are closed when they
are dropped. This need to happen on the main thread on macOS
- Dropping it as soon as the window is closed means the last remaining
`Arc` will be in the rendering thread
- This PR keeps the `Arc` for one frame in the rendering thread before
actually dropping it
2024-06-05 18:13:59 +00:00
..
accessibility.rs fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00
converters.rs Add logical key data to KeyboardInput (#11400) 2024-01-22 15:25:17 +00:00
lib.rs fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00
state.rs flush key_input cache when Bevy loses focus (Adopted) (#13678) 2024-06-05 02:06:47 +00:00
system.rs make sure windows are dropped on main thread (#13686) 2024-06-05 18:13:59 +00:00
winit_config.rs fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00
winit_event.rs flush key_input cache when Bevy loses focus (Adopted) (#13678) 2024-06-05 02:06:47 +00:00
winit_windows.rs fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00