Skip to content

Commit

Permalink
Fix closing window does not exit app in desktop_app mode (bevyengine#…
Browse files Browse the repository at this point in the history
…7628)

# Objective

- `close_when_requested` system needs to run before `exit_on_*` systems, otherwise it takes another loop to exit app.
- Fixes bevyengine#7624

## Solution

- Move `close_when_request` system to Update phase [as before](bevyengine#7624 (comment)).
  • Loading branch information
akimakinai authored and myreprise1 committed Feb 14, 2023
1 parent a8fb288 commit d883cd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_window/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ impl Plugin for WindowPlugin {
}

if self.close_when_requested {
app.add_system(close_when_requested.in_base_set(CoreSet::PostUpdate));
// Need to run before `exit_on_*` systems
app.add_system(close_when_requested);
}

// Register event types
Expand Down

0 comments on commit d883cd4

Please sign in to comment.