From 4ef88fe4c56e441cbcfbf1e0efcd6e2d68fbbc19 Mon Sep 17 00:00:00 2001 From: l-const Date: Mon, 14 Oct 2024 01:11:08 +0300 Subject: [PATCH] Introduce consecutive_click_distance like other toolkits do such as gtk,qt,imgui. --- core/src/mouse/click.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mouse/click.rs b/core/src/mouse/click.rs index 07a4db5a55..55e5f08882 100644 --- a/core/src/mouse/click.rs +++ b/core/src/mouse/click.rs @@ -81,8 +81,8 @@ impl Click { } else { None }; - - self.position == new_position + + self.position.distance(new_position) < 6.0 && duration .map(|duration| duration.as_millis() <= 300) .unwrap_or(false)