summaryrefslogtreecommitdiffstats
path: root/widget/src
diff options
context:
space:
mode:
authorLibravatar myuujiku <myujiku@proton.me>2024-05-02 21:18:47 +0200
committerLibravatar myuujiku <myujiku@proton.me>2024-05-02 21:18:47 +0200
commit8efd32c51bc04113a393dbf85c962f7e0343a127 (patch)
tree7acb876e5286ef35e5015d91a50ec73a901cc9e6 /widget/src
parentaae8e4f5cfabfc3725ac938023fa29a6737a380c (diff)
downloadiced-8efd32c51bc04113a393dbf85c962f7e0343a127.tar.gz
iced-8efd32c51bc04113a393dbf85c962f7e0343a127.tar.bz2
iced-8efd32c51bc04113a393dbf85c962f7e0343a127.zip
Apply bounds check when grabbing `image::Viewer`
Diffstat (limited to 'widget/src')
-rw-r--r--widget/src/image/viewer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/widget/src/image/viewer.rs b/widget/src/image/viewer.rs
index 214cb996..2e6a7528 100644
--- a/widget/src/image/viewer.rs
+++ b/widget/src/image/viewer.rs
@@ -216,7 +216,7 @@ where
event::Status::Captured
}
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => {
- let Some(cursor_position) = cursor.position() else {
+ let Some(cursor_position) = cursor.position_over(bounds) else {
return event::Status::Ignored;
};