pub fn close_when_requested( commands: Commands<'_, '_>, closed: EventReader<'_, '_, WindowCloseRequested> )
Close windows in response to
WindowCloseRequested (e.g. when the close button is pressed).
This system is added by the
WindowPlugin in the default configuration.
To disable this behavior, set
close_when_requested (on the
Ensure that you read the caveats documented on that field if doing so.