Skip to content

Commit

Permalink
On Web, wake event loop on request_redraw()
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Mar 15, 2023
1 parent 77f8e51 commit 031043e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ And please only add new entries to the top of this list, right below the `# Unre

- Bump MSRV from `1.60` to `1.64`.
- Fix macOS memory leaks.
- On Web: fix `Window::request_redraw` not waking the event loop when called from outside the loop.

# 0.28.2

Expand Down
1 change: 1 addition & 0 deletions src/platform_impl/web/event_loop/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ impl<T: 'static> Shared<T> {

pub fn request_redraw(&self, id: WindowId) {
self.0.redraw_pending.borrow_mut().insert(id);
self.send_events(iter::empty());
}

pub fn init(&self) {
Expand Down

0 comments on commit 031043e

Please sign in to comment.