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
co-authored by Max Brunsfeld
parent f1ebad22db
commit 9b94f1483a
4 changed files with 24 additions and 9 deletions
+9 -1
View File
@@ -595,6 +595,14 @@ impl AppContext {
break;
}
}
for (_, window) in &self.windows {
if let Some(window) = window.as_ref() {
if window.dirty {
window.platform_window.invalidate();
}
}
}
}
/// Repeatedly called during `flush_effects` to release any entities whose
@@ -713,7 +721,7 @@ impl AppContext {
fn apply_refresh_effect(&mut self) {
for window in self.windows.values_mut() {
if let Some(window) = window.as_mut() {
window.platform_window.invalidate();
window.dirty = true;
}
}
}