More mouse occlusion work

This commit is contained in:
Conrad Irwin
2023-11-28 09:59:58 -07:00
parent ca0dcf741f
commit a761e6ca0e
5 changed files with 73 additions and 32 deletions
+3 -3
View File
@@ -723,12 +723,12 @@ pub struct Interactivity {
#[derive(Clone)]
pub struct InteractiveBounds {
bounds: Bounds<Pixels>,
stacking_order: StackingOrder,
pub bounds: Bounds<Pixels>,
pub stacking_order: StackingOrder,
}
impl InteractiveBounds {
fn visibly_contains(&self, point: &Point<Pixels>, cx: &WindowContext) -> bool {
pub fn visibly_contains(&self, point: &Point<Pixels>, cx: &WindowContext) -> bool {
self.bounds.contains_point(point) && cx.was_top_layer(&point, &self.stacking_order)
}
}