From 8f7f5db8e025f76d6da9fd0b4fe79277e05d80d7 Mon Sep 17 00:00:00 2001 From: Aaron Muir Hamilton Date: Mon, 4 Mar 2024 11:18:19 -0500 Subject: [PATCH] Reset retained click count after mouse released. (#181) --- src/widget/raw_event.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widget/raw_event.rs b/src/widget/raw_event.rs index 1d3f36620..212d94f9f 100644 --- a/src/widget/raw_event.rs +++ b/src/widget/raw_event.rs @@ -119,7 +119,9 @@ impl PointerCrusher { self.e.wheel_delta = None; self.e.buttons.remove(&button); self.e.button = Some(button); - self.e.clone() + let r = self.e.clone(); + self.e.count = 0; + r } pub fn moved(&mut self, pos: Point) -> MouseEvent {