summaryrefslogtreecommitdiffstats
path: root/native/src/overlay.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/overlay.rs')
-rw-r--r--native/src/overlay.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/native/src/overlay.rs b/native/src/overlay.rs
index e7394494..16d8bb31 100644
--- a/native/src/overlay.rs
+++ b/native/src/overlay.rs
@@ -89,6 +89,15 @@ where
) -> mouse::Interaction {
mouse::Interaction::Idle
}
+
+ /// Whether the [`Overlay`] contains the cursor
+ fn contains_cursor(
+ &self,
+ layout: Layout<'_>,
+ cursor_position: Point,
+ ) -> bool {
+ layout.bounds().contains(cursor_position)
+ }
}
/// Returns a [`Group`] of overlay [`Element`] children.