From a698f1bf63b90df6c553fbffb430d978b9d44048 Mon Sep 17 00:00:00 2001 From: localcc Date: Fri, 12 Dec 2025 06:49:29 -0800 Subject: [PATCH] Fix Bounds::contains (#44711) Closes #11643 Release Notes: - Fixed double hover state on windows Co-authored-by: Kirill Bulatov --- crates/gpui/src/geometry.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/gpui/src/geometry.rs b/crates/gpui/src/geometry.rs index 4daec6d15367f3e12bab3cba658ccb3f261e9f46..f466624dfb91af9b4a33421ea15827ebe2559665 100644 --- a/crates/gpui/src/geometry.rs +++ b/crates/gpui/src/geometry.rs @@ -1416,9 +1416,9 @@ where /// ``` pub fn contains(&self, point: &Point) -> bool { point.x >= self.origin.x - && point.x <= self.origin.x.clone() + self.size.width.clone() + && point.x < self.origin.x.clone() + self.size.width.clone() && point.y >= self.origin.y - && point.y <= self.origin.y.clone() + self.size.height.clone() + && point.y < self.origin.y.clone() + self.size.height.clone() } /// Checks if this bounds is completely contained within another bounds.