Remove internal ActiveEventLoop::clear_exit

How to store and clear the internal state should be internal to the
implementation on each backend.
This commit is contained in:
Mads Marquart 2024-07-14 20:51:38 +02:00 committed by GitHub
parent 5b8f5cb54a
commit ee3ab33a7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 12 additions and 21 deletions

View file

@ -375,6 +375,7 @@ impl EventLoop {
&mut self,
mut app: A,
) -> Result<(), EventLoopError> {
self.event_processor.target.p.clear_exit();
let exit = loop {
match self.pump_app_events(None, &mut app) {
PumpStatus::Exit(0) => {
@ -600,13 +601,11 @@ impl EventLoop {
}
fn set_exit_code(&self, code: i32) {
let window_target = EventProcessor::window_target(&self.event_processor.target);
window_target.set_exit_code(code);
self.window_target().p.set_exit_code(code);
}
fn exit_code(&self) -> Option<i32> {
let window_target = EventProcessor::window_target(&self.event_processor.target);
window_target.exit_code()
self.window_target().p.exit_code()
}
}