From 4520227e98fdf3645fc7150bc55a0aeda09e95e8 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Sat, 22 Oct 2022 22:02:22 -0700 Subject: [PATCH] remove mouse position from render params --- crates/gpui/src/app.rs | 3 --- crates/gpui/src/presenter.rs | 6 ------ 2 files changed, 9 deletions(-) diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 3a2e850239..5cbc786b72 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -21,7 +21,6 @@ use std::{ use anyhow::{anyhow, Context, Result}; use lazy_static::lazy_static; use parking_lot::Mutex; -use pathfinder_geometry::vector::Vector2F; use postage::oneshot; use smallvec::SmallVec; use smol::prelude::*; @@ -940,7 +939,6 @@ impl MutableAppContext { window_id, view_id, titlebar_height, - mouse_position: Default::default(), hovered_region_ids: Default::default(), clicked_region_ids: None, refreshing: false, @@ -3897,7 +3895,6 @@ pub struct RenderParams { pub window_id: usize, pub view_id: usize, pub titlebar_height: f32, - pub mouse_position: Vector2F, pub hovered_region_ids: HashSet, pub clicked_region_ids: Option<(HashSet, MouseButton)>, pub refreshing: bool, diff --git a/crates/gpui/src/presenter.rs b/crates/gpui/src/presenter.rs index f8c4482a06..264e5af581 100644 --- a/crates/gpui/src/presenter.rs +++ b/crates/gpui/src/presenter.rs @@ -90,7 +90,6 @@ impl Presenter { window_id: self.window_id, view_id: *view_id, titlebar_height: self.titlebar_height, - mouse_position: self.mouse_position.clone(), hovered_region_ids: self.hovered_region_ids.clone(), clicked_region_ids: self .clicked_button @@ -117,7 +116,6 @@ impl Presenter { window_id: self.window_id, view_id: *view_id, titlebar_height: self.titlebar_height, - mouse_position: self.mouse_position.clone(), hovered_region_ids: self.hovered_region_ids.clone(), clicked_region_ids: self .clicked_button @@ -233,10 +231,6 @@ impl Presenter { let mut mouse_events = SmallVec::<[_; 2]>::new(); let mut notified_views: HashSet = Default::default(); - if let Some(mouse_position) = event.position() { - self.mouse_position = mouse_position; - } - // 1. Handle platform event. Keyboard events get dispatched immediately, while mouse events // get mapped into the mouse-specific MouseEvent type. // -> These are usually small: [Mouse Down] or [Mouse up, Click] or [Mouse Moved, Mouse Dragged?]