From 67be65461b2ac4d511ef28f8368d47c6728aa637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Fri, 17 Mar 2023 22:16:22 +0100 Subject: [PATCH] Don't handle hover --- backend-embedded-graphics/src/widgets/canvas.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend-embedded-graphics/src/widgets/canvas.rs b/backend-embedded-graphics/src/widgets/canvas.rs index 3ecd2ef..5b62dbf 100644 --- a/backend-embedded-graphics/src/widgets/canvas.rs +++ b/backend-embedded-graphics/src/widgets/canvas.rs @@ -252,7 +252,10 @@ where } } - InputEvent::PointerEvent(position, PointerEvent::Drag | PointerEvent::Hover) => { + // We want controls drawn above the Canvas to get input events. + InputEvent::PointerEvent(_, PointerEvent::Hover) => None, + + InputEvent::PointerEvent(position, PointerEvent::Drag) => { if bounds.contains(position) { Some(0) } else {