diff options
Diffstat (limited to 'native/src/user_interface.rs')
-rw-r--r-- | native/src/user_interface.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs index 2358bff1..68ccda55 100644 --- a/native/src/user_interface.rs +++ b/native/src/user_interface.rs @@ -21,8 +21,8 @@ use crate::{ /// The [`integration_opengl`] & [`integration_wgpu`] examples use a /// [`UserInterface`] to integrate Iced in an existing graphical application. /// -/// [`integration_opengl`]: https://github.com/iced-rs/iced/tree/0.7/examples/integration_opengl -/// [`integration_wgpu`]: https://github.com/iced-rs/iced/tree/0.7/examples/integration_wgpu +/// [`integration_opengl`]: https://github.com/iced-rs/iced/tree/0.8/examples/integration_opengl +/// [`integration_wgpu`]: https://github.com/iced-rs/iced/tree/0.8/examples/integration_wgpu #[allow(missing_debug_implementations)] pub struct UserInterface<'a, Message, Renderer> { root: Element<'a, Message, Renderer>, @@ -440,12 +440,13 @@ where overlay.layout(renderer, self.bounds, Vector::ZERO) }); - let new_cursor_position = - if overlay_layout.bounds().contains(cursor_position) { - Point::new(-1.0, -1.0) - } else { - cursor_position - }; + let new_cursor_position = if overlay + .is_over(Layout::new(&overlay_layout), cursor_position) + { + Point::new(-1.0, -1.0) + } else { + cursor_position + }; self.overlay = Some(overlay_layout); |