summaryrefslogtreecommitdiffstats
path: root/native/src/user_interface.rs
diff options
context:
space:
mode:
authorLibravatar Bingus <shankern@protonmail.com>2023-02-20 10:04:36 -0800
committerLibravatar Bingus <shankern@protonmail.com>2023-02-20 10:04:36 -0800
commit9565b477ca66ef33bf3869361b838275e411ca75 (patch)
tree490f76407909300301cbfda0bda57676fd48882a /native/src/user_interface.rs
parent3aaf5d8873b16302badb14dc5508329c943862fb (diff)
parent8c83d40e115a182136acfe013baa7a3f795ba3a5 (diff)
downloadiced-9565b477ca66ef33bf3869361b838275e411ca75.tar.gz
iced-9565b477ca66ef33bf3869361b838275e411ca75.tar.bz2
iced-9565b477ca66ef33bf3869361b838275e411ca75.zip
Merge remote-tracking branch 'origin/master' into feat/multi-window-support
Diffstat (limited to 'native/src/user_interface.rs')
-rw-r--r--native/src/user_interface.rs17
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);