Skip to content

Commit

Permalink
revert stage changed for window closing (#7296)
Browse files Browse the repository at this point in the history
# Objective

- Fix #7287 

## Solution

- Revert stage changed in windows as entities PR for window closing systems

how it was before:
https://github.com/bevyengine/bevy/blob/f0c504947ce653068a424979faf226c1e990818d/crates/bevy_window/src/lib.rs#L92-L100
  • Loading branch information
mockersf committed Jan 20, 2023
1 parent 06ada2e commit efa2c6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_window/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ impl Plugin for WindowPlugin {

match self.exit_condition {
ExitCondition::OnPrimaryClosed => {
app.add_system(exit_on_primary_closed);
app.add_system_to_stage(CoreStage::PostUpdate, exit_on_primary_closed);
}
ExitCondition::OnAllClosed => {
app.add_system(exit_on_all_closed);
app.add_system_to_stage(CoreStage::PostUpdate, exit_on_all_closed);
}
ExitCondition::DontExit => {}
}

if self.close_when_requested {
app.add_system_to_stage(CoreStage::First, close_when_requested);
app.add_system(close_when_requested);
}

// Register event types
Expand Down

0 comments on commit efa2c6e

Please sign in to comment.