From 6c5799e759c5c8384d53b7e73e5a0b580008bf3f Mon Sep 17 00:00:00 2001 From: l-const Date: Mon, 14 Oct 2024 23:01:07 +0300 Subject: [PATCH] Introduce consecutive click distance like other toolkits such as gtk,qt, imgui. --- core/src/mouse/click.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mouse/click.rs b/core/src/mouse/click.rs index 07a4db5a55..0a373878c0 100644 --- a/core/src/mouse/click.rs +++ b/core/src/mouse/click.rs @@ -82,7 +82,7 @@ impl Click { None }; - self.position == new_position + self.position.distance(new_position) < 6.0 && duration .map(|duration| duration.as_millis() <= 300) .unwrap_or(false)