From 8bce89639522e6b029428c5d20735b0838b219ac Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 3 Feb 2025 22:44:07 -0700 Subject: [PATCH] Invalidate GPUI views regardless of draw phase (#24164) We think this could fix issues around view invalidation during focus handling. I want to run CI on this and see. cc @mikayla-maki @maxbrunsfeld Release Notes: - N/A --- crates/gpui/src/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs index ffedaadb07fd6327a00ec0df01f4a8629f14894d..dcbe302ac9a5eb43b139f1de27d2187085ba28ea 100644 --- a/crates/gpui/src/window.rs +++ b/crates/gpui/src/window.rs @@ -107,9 +107,9 @@ impl WindowInvalidator { pub fn invalidate_view(&self, entity: EntityId, cx: &mut App) -> bool { let mut inner = self.inner.borrow_mut(); + inner.dirty_views.insert(entity); if inner.draw_phase == DrawPhase::None { inner.dirty = true; - inner.dirty_views.insert(entity); cx.push_effect(Effect::Notify { emitter: entity }); true } else {