From db11c7e9dabc8edb4f59fdac25978883afad3be9 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 12 Sep 2018 10:46:21 +0300 Subject: [PATCH] awful.placement: Fix client size corruption in no_overlap The awful.placement.no_overlap function was adding the window border width to the client width and height (this is performed in area_common(), which is called by geometry_common()), but did not reverse this operation by calling remove_border() before returning the final geometry; because of this, using no_overlap resulted in increasing the window width and height by 2*border_width. The bug was probably introduced in commit ebcc19844e25705270 (before that commit no_overlap changed the window position directly instead of relying on the new placement infrastructure), but was not noticed because of other problems (e.g., in the default configuration the result of no_overlap was overridden by the buggy no_offscreen). Signed-off-by: Sergey Vlasov --- lib/awful/placement.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index 41334bc48..d516195d3 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -941,6 +941,7 @@ function placement.no_overlap(c, args) new.width = geometry.width new.height = geometry.height + remove_border(c, args, new) geometry_common(c, args, new) return fix_new_geometry(new, args, true) end