Invalidate GPUI views regardless of draw phase (#24164)

Nathan Sobo created

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

Change summary

crates/gpui/src/window.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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 {