bevy/crates
François 07d576987a fix order of exit/close window systems (#5558)
# Objective

Fixes #5384 and maybe other issues around window closing/app not exiting

## Solution

There are three systems involved in exiting when closing a window:
- `close_when_requested` asking Winit to close the window in stage `Update`
- `exit_on_all_closed` exiting when no window remains opened in stage `Update`
- `change_window` removing windows that are closed in stage `PostUpdate`

This ordering meant that when closing a window, we had to run one more frame to actually exit. As there was no window, panics could occur in systems assuming there was a window. In case of Bevy app using a low power options, that means waiting for the timeout before actually exiting the app (60 seconds by default)

This PR changes the ordering so that `exit_on_all_closed` happens after `change_window` in the same frame, so there isn't an extra frame without window
2022-08-03 20:03:34 +00:00
..
bevy_animation Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_app Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_asset Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_audio Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_core Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_core_pipeline bevy_reflect: Update enum derives (#5473) 2022-08-02 22:40:29 +00:00
bevy_derive Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_diagnostic Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_dylib Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_dynamic_plugin Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_ecs Add FromWorld bound to T in Local<T> (#5481) 2022-08-01 16:50:11 +00:00
bevy_ecs_compile_fail_tests Replace many_for_each_mut with iter_many_mut. (#5402) 2022-07-30 01:38:13 +00:00
bevy_encase_derive Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_gilrs Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_gltf Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_hierarchy Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_input Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_internal Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_log Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_macro_utils Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_math Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_mikktspace Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_pbr add default direction to DirectionalLight docs (#5188) 2022-08-02 18:13:21 +00:00
bevy_ptr Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_reflect bevy_reflect: Reflect enums (#4761) 2022-08-02 22:14:41 +00:00
bevy_render bevy_reflect: Update enum derives (#5473) 2022-08-02 22:40:29 +00:00
bevy_scene Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_sprite Fix View by adding missing fields present in ViewUniform (#5512) 2022-07-31 19:10:53 +00:00
bevy_tasks Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_text bevy_reflect: Update enum derives (#5473) 2022-08-02 22:40:29 +00:00
bevy_time Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_transform Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_ui bevy_reflect: Update enum derives (#5473) 2022-08-02 22:40:29 +00:00
bevy_utils Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00
bevy_window fix order of exit/close window systems (#5558) 2022-08-03 20:03:34 +00:00
bevy_winit Release 0.8.0 (#5490) 2022-07-30 14:07:30 +00:00