From 7cd13ec6a9d8a8c6f1f02370ccabe82f3ec1bbbd Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Thu, 28 Mar 2024 13:36:38 -0700 Subject: [PATCH] Correctly handle window geometry `loc` in `Focus::under` `Focus::under` replaced code in 4 places, that were inconsistent in how they handled this. This seems to be more correct, in each case. --- src/shell/element/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/element/window.rs b/src/shell/element/window.rs index 699a84eb..017ae7a9 100644 --- a/src/shell/element/window.rs +++ b/src/shell/element/window.rs @@ -115,8 +115,8 @@ impl Focus { header_height: i32, location: Point, ) -> Option { - let loc = location.to_i32_round::(); let geo = surface.geometry(); + let loc = location.to_i32_round::() - geo.loc; if loc.y < 0 && loc.x < 0 { Some(Focus::ResizeTopLeft) } else if loc.y < 0 && loc.x >= geo.size.w {