Fixed clicks falling through the modal terminal

co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Mikayla Maki 2023-05-08 10:53:06 -07:00
parent 39bddfc7b7
commit 2cf928c85a
No known key found for this signature in database

View File

@ -223,41 +223,41 @@ impl HandlerSet {
set.insert( set.insert(
HandlerKey::new(MouseEvent::move_disc(), None), HandlerKey::new(MouseEvent::move_disc(), None),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
set.insert( set.insert(
HandlerKey::new(MouseEvent::hover_disc(), None), HandlerKey::new(MouseEvent::hover_disc(), None),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
for button in MouseButton::all() { for button in MouseButton::all() {
set.insert( set.insert(
HandlerKey::new(MouseEvent::drag_disc(), Some(button)), HandlerKey::new(MouseEvent::drag_disc(), Some(button)),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
set.insert( set.insert(
HandlerKey::new(MouseEvent::down_disc(), Some(button)), HandlerKey::new(MouseEvent::down_disc(), Some(button)),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
set.insert( set.insert(
HandlerKey::new(MouseEvent::up_disc(), Some(button)), HandlerKey::new(MouseEvent::up_disc(), Some(button)),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
set.insert( set.insert(
HandlerKey::new(MouseEvent::click_disc(), Some(button)), HandlerKey::new(MouseEvent::click_disc(), Some(button)),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
set.insert( set.insert(
HandlerKey::new(MouseEvent::down_out_disc(), Some(button)), HandlerKey::new(MouseEvent::down_out_disc(), Some(button)),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
set.insert( set.insert(
HandlerKey::new(MouseEvent::up_out_disc(), Some(button)), HandlerKey::new(MouseEvent::up_out_disc(), Some(button)),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
} }
set.insert( set.insert(
HandlerKey::new(MouseEvent::scroll_wheel_disc(), None), HandlerKey::new(MouseEvent::scroll_wheel_disc(), None),
SmallVec::from_buf([Rc::new(|_, _, _, _| false)]), SmallVec::from_buf([Rc::new(|_, _, _, _| true)]),
); );
HandlerSet { set } HandlerSet { set }