Skip to content

Commit

Permalink
Apply bounds check when grabbing image::Viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
myuujiku committed May 2, 2024
1 parent aae8e4f commit 8efd32c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widget/src/image/viewer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit 8efd32c

Please sign in to comment.