Redraw the window at the end of flush_effects in tests

Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-12-11 20:10:27 +01:00
parent f1ebad22db
commit 9b94f1483a
4 changed files with 24 additions and 9 deletions

View file

@ -136,11 +136,12 @@ impl Platform for TestPlatform {
&self,
handle: AnyWindowHandle,
options: WindowOptions,
_draw: Box<dyn FnMut() -> Result<Scene>>,
draw: Box<dyn FnMut() -> Result<Scene>>,
) -> Box<dyn crate::PlatformWindow> {
*self.active_window.lock() = Some(handle);
Box::new(TestWindow::new(
options,
draw,
self.weak.clone(),
self.active_display.clone(),
))