From 5b489284e4609a9a3f95e8c1eed8607112516a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n?= Date: Sun, 27 Oct 2019 16:09:54 +0100 Subject: [PATCH] Implement revamped `RedrawRequested` on macOS (#1235) --- src/platform_impl/macos/app_state.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/platform_impl/macos/app_state.rs b/src/platform_impl/macos/app_state.rs index 7e116567..be3aeb12 100644 --- a/src/platform_impl/macos/app_state.rs +++ b/src/platform_impl/macos/app_state.rs @@ -266,13 +266,11 @@ impl AppState { for event in HANDLER.take_events() { HANDLER.handle_nonuser_event(event); } + HANDLER.handle_nonuser_event(Event::MainEventsCleared); for window_id in HANDLER.should_redraw() { - HANDLER.handle_nonuser_event(Event::WindowEvent { - window_id, - event: WindowEvent::RedrawRequested, - }); + HANDLER.handle_nonuser_event(Event::RedrawRequested(window_id)); } - HANDLER.handle_nonuser_event(Event::EventsCleared); + HANDLER.handle_nonuser_event(Event::RedrawEventsCleared); HANDLER.set_in_callback(false); } if HANDLER.should_exit() {