Fix mouse events when element is occluded (#3417)

This commit adds a depth map to the frame so we can find the "top most"
opaque layer by stacking order for a given point.

This lets us determine whether the element being hovered was part of the
given layer in the previous frame, which fixes the hover issue.

Still to do:
* [ ] Fix up mouse events too (I tried this, but it's not working yet,
and I want to understand why)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin
2023-11-28 15:57:22 -07:00
committed by GitHub
7 changed files with 189 additions and 70 deletions
-1
View File
@@ -114,7 +114,6 @@ impl<D: PickerDelegate> Picker<D> {
}
fn cancel(&mut self, _: &menu::Cancel, cx: &mut ViewContext<Self>) {
dbg!("canceling!");
self.delegate.dismissed(cx);
}