diff --git a/lib/awful/placement.lua.in b/lib/awful/placement.lua.in index bc95e3a5e..d334f7fc3 100644 --- a/lib/awful/placement.lua.in +++ b/lib/awful/placement.lua.in @@ -108,17 +108,17 @@ function placement.no_offscreen(c) local c = c or capi.client.focus local geometry = c:geometry() local screen = c.screen or a_screen.getbycoord(geometry.x, geometry.y) - local border = c.border_width + local border = c.border_width local screen_geometry = capi.screen[screen].workarea if geometry.x + geometry.width + 2*border > screen_geometry.x + screen_geometry.width then - geometry.x = screen_geometry.x + screen_geometry.width - geometry.width + geometry.x = screen_geometry.x + screen_geometry.width - geometry.width - 2*border elseif geometry.x < screen_geometry.x then geometry.x = screen_geometry.x end if geometry.y + geometry.height + border > screen_geometry.y + screen_geometry.height then - geometry.y = screen_geometry.y + screen_geometry.height - geometry.height + geometry.y = screen_geometry.y + screen_geometry.height - geometry.height - 2*border elseif geometry.y < screen_geometry.y then geometry.y = screen_geometry.y end