From 142d55ff248d4a316679bd13f96453e8db0d466a Mon Sep 17 00:00:00 2001 From: Dusty DeWeese Date: Mon, 11 Apr 2022 10:51:21 -0700 Subject: [PATCH] Always send RedrawEventsCleared on iOS This makes it consistent with the rest of the platforms in winit. --- CHANGELOG.md | 1 + src/platform_impl/ios/app_state.rs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2235fa83..73d37574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ And please only add new entries to the top of this list, right below the `# Unre - Added helper methods on `ControlFlow` to set its value. - On Wayland, fix `TouchPhase::Ended` always reporting the location of the first touch down, unless the compositor sent a cancel or frame event. +- On iOS, send `RedrawEventsCleared` even if there are no redraw events, consistent with other platforms. # 0.26.1 (2022-01-05) diff --git a/src/platform_impl/ios/app_state.rs b/src/platform_impl/ios/app_state.rs index 43330b0b..6d1d2069 100644 --- a/src/platform_impl/ios/app_state.rs +++ b/src/platform_impl/ios/app_state.rs @@ -811,9 +811,7 @@ pub unsafe fn handle_main_events_cleared() { }) .collect(); - if !redraw_events.is_empty() { - redraw_events.push(EventWrapper::StaticEvent(Event::RedrawEventsCleared)); - } + redraw_events.push(EventWrapper::StaticEvent(Event::RedrawEventsCleared)); drop(this); handle_nonuser_events(redraw_events);