Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Mark the window as dirty when first opening it (#7384)
Antonio Scandurrad742b3bfac0c
diff --git a/crates/gpui/src/platform/mac/window.rs b/crates/gpui/src/platform/mac/window.rsindex ca6a3f8d62f..946e608a7a6 100644--- a/crates/gpui/src/platform/mac/window.rs+++ b/crates/gpui/src/platform/mac/window.rs@@ -1370,10 +1370,10 @@ extern "C" fn window_did_change_screen(this: &Object, _: Sel, _: id) {let mut lock = window_state.as_ref().lock();unsafe {let screen = lock.native_window.screen();- if screen != nil {- lock.display_link = start_display_link(screen, lock.native_view.as_ptr());- } else {+ if screen == nil {lock.display_link = nil;+ } else {+ lock.display_link = start_display_link(screen, lock.native_view.as_ptr());}}}diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rsindex 1cfd01b52e2..c9c672557f5 100644--- a/crates/gpui/src/window.rs+++ b/crates/gpui/src/window.rs@@ -340,7 +340,7 @@ impl Window {let bounds = platform_window.bounds();let appearance = platform_window.appearance();let text_system = Arc::new(WindowTextSystem::new(cx.text_system().clone()));- let dirty = Rc::new(Cell::new(false));+ let dirty = Rc::new(Cell::new(true));let last_input_timestamp = Rc::new(Cell::new(Instant::now()));platform_window.on_request_frame(Box::new({