From 8d82702da201e71103a217a1eaa771d02d455727 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 13 Oct 2022 15:57:19 -0600 Subject: [PATCH] Pass the current view id value when painting List's mouse region Previously, a dummy value was being passed. I think this slipped in accidentally. --- crates/gpui/src/elements/list.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/gpui/src/elements/list.rs b/crates/gpui/src/elements/list.rs index a6c76cf643..7711d4497b 100644 --- a/crates/gpui/src/elements/list.rs +++ b/crates/gpui/src/elements/list.rs @@ -264,8 +264,8 @@ impl Element for List { let visible_bounds = visible_bounds.intersection(bounds).unwrap_or_default(); cx.scene.push_layer(Some(visible_bounds)); - cx.scene - .push_mouse_region(MouseRegion::new::(10, 0, bounds).on_scroll({ + cx.scene.push_mouse_region( + MouseRegion::new::(cx.current_view_id(), 0, bounds).on_scroll({ let state = self.state.clone(); let height = bounds.height(); let scroll_top = scroll_top.clone(); @@ -278,7 +278,8 @@ impl Element for List { cx, ) } - })); + }), + ); let state = &mut *self.state.0.borrow_mut(); for (mut element, origin) in state.visible_elements(bounds, scroll_top) {