From 1805124c54f1d2d50f5cf84fcb8479d2a6ff849d Mon Sep 17 00:00:00 2001 From: dAxpeDDa Date: Sun, 12 Mar 2023 17:18:39 +0100 Subject: [PATCH] On Web, wake event loop on `request_redraw()` --- CHANGELOG.md | 1 + src/platform_impl/web/event_loop/runner.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 544a618776..74f7045a08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ And please only add new entries to the top of this list, right below the `# Unre # 0.28.3 - Fix macOS memory leaks. +- On Web: fix `Window::request_redraw` not waking the event loop when called from outside the loop. # 0.28.2 diff --git a/src/platform_impl/web/event_loop/runner.rs b/src/platform_impl/web/event_loop/runner.rs index bdb68ff466..66ac78c201 100644 --- a/src/platform_impl/web/event_loop/runner.rs +++ b/src/platform_impl/web/event_loop/runner.rs @@ -157,6 +157,7 @@ impl Shared { pub fn request_redraw(&self, id: WindowId) { self.0.redraw_pending.borrow_mut().insert(id); + self.send_events(iter::empty()); } pub fn init(&self) {