Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Set cursor style only if we're the active window
Antonio Scandurrab87c45e6f5a3
diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rsindex 16de7ef62a4..75f67e4ddb6 100644--- a/crates/gpui2/src/window.rs+++ b/crates/gpui2/src/window.rs@@ -1285,12 +1285,17 @@ impl<'a> WindowContext<'a> {mem::swap(&mut window.rendered_frame, &mut window.next_frame);let scene = self.window.rendered_frame.scene_builder.build();++ // Set the cursor only if we're the active window.let cursor_style = self.window.requested_cursor_style.take().unwrap_or(CursorStyle::Arrow);- self.platform.set_cursor_style(cursor_style);+ if self.is_window_active() {+ self.platform.set_cursor_style(cursor_style);+ }+self.window.dirty = false;scene