Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove debug wiring
Mikayla Maki1fc6276eaba5
diff --git a/crates/gpui/src/presenter.rs b/crates/gpui/src/presenter.rsindex 5bff7e7bb11..1fff5c50b51 100644--- a/crates/gpui/src/presenter.rs+++ b/crates/gpui/src/presenter.rs@@ -31,7 +31,6 @@ use std::{ops::{Deref, DerefMut, Range},sync::Arc,};-use time::Instant;pub struct Presenter {window_id: usize,@@ -318,8 +317,14 @@ impl Presenter {}}- if cx.is_topmost_window_for_position(self.window_id, *position) {+ let t0 = std::time::Instant::now();+ let is_topmost_window =+ cx.is_topmost_window_for_position(self.window_id, *position);+ println!("is_topmost_window => {:?}", t0.elapsed());+ if is_topmost_window {+ let t1 = std::time::Instant::now();cx.platform().set_cursor_style(style_to_assign);+ println!("set_cursor_style => {:?}", t1.elapsed());}if !event_reused {diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex 71c5ef97a20..b0abe09070f 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -31,9 +31,8 @@ use futures::{};use gpui::{actions,- color::Color,elements::*,- geometry::vector::{vec2f, Vector2F},+ geometry::vector::Vector2F,impl_actions, impl_internal_actions,keymap_matcher::KeymapContext,platform::{CursorStyle, WindowOptions},@@ -101,7 +100,6 @@ actions!(NewTerminal,NewSearch,Feedback,- ShowNotif,]);@@ -264,59 +262,6 @@ pub fn init(app_state: Arc<AppState>, cx: &mut MutableAppContext) {client.add_view_request_handler(Workspace::handle_follow);client.add_view_message_handler(Workspace::handle_unfollow);client.add_view_message_handler(Workspace::handle_update_followers);-- // REMEMBER TO DELETE THE SHOW NOTIF- cx.add_action(- |_workspace: &mut Workspace, _: &ShowNotif, cx: &mut ViewContext<Workspace>| {- struct DummyView;-- impl Entity for DummyView {- type Event = ();- }-- impl View for DummyView {- fn ui_name() -> &'static str {- "DummyView"- }- fn render(&mut self, cx: &mut RenderContext<'_, Self>) -> ElementBox {- MouseEventHandler::<DummyView>::new(0, cx, |state, _cx| {- Empty::new()- .contained()- .with_background_color(if state.hovered() {- Color::red()- } else {- Color::blue()- })- .constrained()- .with_width(200.)- .with_height(200.)- .boxed()- })- .on_click(MouseButton::Left, |_, _| {- println!("click");- })- .with_cursor_style(CursorStyle::ResizeUpDown)- .boxed()- }- }-- cx.add_window(- WindowOptions {- bounds: gpui::WindowBounds::Fixed(gpui::geometry::rect::RectF::new(- vec2f(400., 200.),- vec2f(300., 200.),- )),- titlebar: None,- center: false,- focus: false,- kind: gpui::WindowKind::PopUp,- is_movable: true,- screen: None,- },- |_cx| DummyView,- )- },- )}type ProjectItemBuilders = HashMap<