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 ebcc19844e (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 <sigprof@gmail.com>
This commit is contained in:
Sergey Vlasov 2018-09-12 10:46:21 +03:00
parent 7f11bc1108
commit db11c7e9da
1 changed files with 1 additions and 0 deletions

View File

@ -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