From 297254cbad0746baa3234a46bc6111e138e9cf63 Mon Sep 17 00:00:00 2001 From: SQReder Date: Mon, 21 Sep 2026 18:10:48 +0300 Subject: [PATCH] Fix ShrinkTo computing a wrong bottom edge The bottom edge was derived from the container height and the width difference instead of the container bottom and the height difference, so unresizable windows were given a bogus target rectangle. Derive the right and bottom edges from the requested size so it is preserved exactly, including for odd size differences. --- FancyWM/TilingService.Private.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FancyWM/TilingService.Private.cs b/FancyWM/TilingService.Private.cs index 5397544..4682942 100644 --- a/FancyWM/TilingService.Private.cs +++ b/FancyWM/TilingService.Private.cs @@ -1719,8 +1719,8 @@ private static Rectangle ShrinkTo(Rectangle container, int width, int height) return new Rectangle( container.Left + wdiff / 2, container.Top + hdiff / 2, - container.Right - wdiff / 2, - container.Height - wdiff / 2 + container.Left + wdiff / 2 + width, + container.Top + hdiff / 2 + height ); }