diff --git a/CHANGELOG.md b/CHANGELOG.md index d9257f7a..ae81ae6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - On Windows, `set_ime_position` is now a no-op instead of a runtime crash. - On Android, `set_fullscreen` is now a no-op instead of a runtime crash. - On iOS and Android, `set_inner_size` is now a no-op instead of a runtime crash. +- On Android, fix `ControlFlow::Poll` not polling the Android event queue. - **Breaking:** On Web, `set_cursor_position` and `set_cursor_grab` will now always return an error. - **Breaking:** `PixelDelta` scroll events now return a `PhysicalPosition`. diff --git a/src/platform_impl/android/mod.rs b/src/platform_impl/android/mod.rs index e4bdef82..453815d8 100644 --- a/src/platform_impl/android/mod.rs +++ b/src/platform_impl/android/mod.rs @@ -211,9 +211,7 @@ impl EventLoop { ); } } - None => { - control_flow = ControlFlow::Exit; - } + None => {} } call_event_handler!( @@ -258,6 +256,11 @@ impl EventLoop { break 'event_loop; } ControlFlow::Poll => { + self.first_event = poll( + self.looper + .poll_all_timeout(Duration::from_millis(0)) + .unwrap(), + ); self.start_cause = event::StartCause::Poll; } ControlFlow::Wait => {