From 345544646ac642ee7098f63a2f543a1f660c96a0 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Sat, 22 Oct 2022 22:16:00 -0700 Subject: [PATCH] remove more notify on moves --- crates/gpui/src/presenter.rs | 7 ++----- crates/gpui/src/scene/mouse_region.rs | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/gpui/src/presenter.rs b/crates/gpui/src/presenter.rs index 264e5af581..4344639479 100644 --- a/crates/gpui/src/presenter.rs +++ b/crates/gpui/src/presenter.rs @@ -384,7 +384,7 @@ impl Presenter { //Ensure that hover entrance events aren't sent twice if self.hovered_region_ids.insert(region.id()) { valid_regions.push(region.clone()); - if region.notify_on_hover || region.notify_on_move { + if region.notify_on_hover { notified_views.insert(region.id().view_id()); } } @@ -392,7 +392,7 @@ impl Presenter { // Ensure that hover exit events aren't sent twice if self.hovered_region_ids.remove(®ion.id()) { valid_regions.push(region.clone()); - if region.notify_on_hover || region.notify_on_move { + if region.notify_on_hover { notified_views.insert(region.id().view_id()); } } @@ -451,9 +451,6 @@ impl Presenter { for (mouse_region, _) in self.mouse_regions.iter().rev() { if mouse_region.bounds.contains_point(self.mouse_position) { valid_regions.push(mouse_region.clone()); - if mouse_region.notify_on_move { - notified_views.insert(mouse_region.id().view_id()); - } } } } diff --git a/crates/gpui/src/scene/mouse_region.rs b/crates/gpui/src/scene/mouse_region.rs index 64c75153e4..4b5217cc2d 100644 --- a/crates/gpui/src/scene/mouse_region.rs +++ b/crates/gpui/src/scene/mouse_region.rs @@ -20,7 +20,6 @@ pub struct MouseRegion { pub bounds: RectF, pub handlers: HandlerSet, pub hoverable: bool, - pub notify_on_move: bool, pub notify_on_hover: bool, pub notify_on_click: bool, } @@ -55,7 +54,6 @@ impl MouseRegion { bounds, handlers, hoverable: true, - notify_on_move: false, notify_on_hover: false, notify_on_click: false, }