Revert the commit that broke Zed display capabilities (#7326)

This commit is contained in:
Kirill Bulatov 2024-02-03 18:32:56 +02:00 committed by GitHub
parent 06674a21f9
commit 1ab0af2fa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 37 additions and 50 deletions

View file

@ -652,20 +652,27 @@ impl AppContext {
}
}
} else {
for window in self.windows.values() {
if let Some(window) = window.as_ref() {
if window.dirty {
window.platform_window.invalidate();
}
}
}
#[cfg(any(test, feature = "test-support"))]
for window in self
.windows
.values()
.filter_map(|window| {
let window = window.as_ref()?;
window.dirty.get().then_some(window.handle)
(window.dirty || window.focus_invalidated).then_some(window.handle)
})
.collect::<Vec<_>>()
{
self.update_window(window, |_, cx| cx.draw()).unwrap();
}
#[allow(clippy::collapsible_else_if)]
if self.pending_effects.is_empty() {
break;
}
@ -742,7 +749,7 @@ impl AppContext {
fn apply_refresh_effect(&mut self) {
for window in self.windows.values_mut() {
if let Some(window) = window.as_mut() {
window.dirty.set(true);
window.dirty = true;
}
}
}