Web: fix WindowEvent::Resized not using rAF (#3790)

This commit is contained in:
daxpedda 2024-07-16 12:29:27 +02:00 committed by GitHub
parent dc99920612
commit 8e23d1608a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -85,3 +85,6 @@ changelog entry.
- On Wayland, avoid crashing when compositor is misbehaving. - On Wayland, avoid crashing when compositor is misbehaving.
- Account for different browser engine implementations of pointer movement coordinate space. - Account for different browser engine implementations of pointer movement coordinate space.
- On Web, fix `WindowEvent::Resized` not using `requestAnimationFrame` when sending
`WindowEvent::RedrawRequested` and also potentially causing `WindowEvent::RedrawRequested`
to not be de-duplicated.

View file

@ -613,7 +613,7 @@ impl ActiveEventLoop {
window_id: RootWindowId(id), window_id: RootWindowId(id),
event: WindowEvent::Resized(new_size), event: WindowEvent::Resized(new_size),
}); });
runner.request_redraw(RootWindowId(id)); canvas.request_animation_frame();
} }
} }
}, },