remove mouse position from render params

This commit is contained in:
K Simmons 2022-10-22 22:02:22 -07:00
parent f5795ffc6f
commit 4520227e98
2 changed files with 0 additions and 9 deletions

View file

@ -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<MouseRegionId>,
pub clicked_region_ids: Option<(HashSet<MouseRegionId>, MouseButton)>,
pub refreshing: bool,

View file

@ -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<usize> = 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?]