Implement revamped RedrawRequested on macOS (#1235)

This commit is contained in:
Héctor Ramón 2019-10-27 16:09:54 +01:00 committed by Osspial
parent cdc32eb817
commit 5b489284e4

View file

@ -266,13 +266,11 @@ impl AppState {
for event in HANDLER.take_events() { for event in HANDLER.take_events() {
HANDLER.handle_nonuser_event(event); HANDLER.handle_nonuser_event(event);
} }
HANDLER.handle_nonuser_event(Event::MainEventsCleared);
for window_id in HANDLER.should_redraw() { for window_id in HANDLER.should_redraw() {
HANDLER.handle_nonuser_event(Event::WindowEvent { HANDLER.handle_nonuser_event(Event::RedrawRequested(window_id));
window_id,
event: WindowEvent::RedrawRequested,
});
} }
HANDLER.handle_nonuser_event(Event::EventsCleared); HANDLER.handle_nonuser_event(Event::RedrawEventsCleared);
HANDLER.set_in_callback(false); HANDLER.set_in_callback(false);
} }
if HANDLER.should_exit() { if HANDLER.should_exit() {