Skip to content

Commit bf514ff

Browse files
committed
Fix closing window does not exit app in desktop_app mode (#7628)
# Objective - `close_when_requested` system needs to run before `exit_on_*` systems, otherwise it takes another loop to exit app. - Fixes #7624 ## Solution - Move `close_when_request` system to Update phase [as before](#7624 (comment)).
1 parent 68c94c0 commit bf514ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/bevy_window/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ impl Plugin for WindowPlugin {
102102
}
103103

104104
if self.close_when_requested {
105-
app.add_system(close_when_requested.in_base_set(CoreSet::PostUpdate));
105+
// Need to run before `exit_on_*` systems
106+
app.add_system(close_when_requested);
106107
}
107108

108109
// Register event types

0 commit comments

Comments
 (0)