naughty: fix offset calculation for *_middle position (#1727)

This commit is contained in:
paul-axe 2017-04-15 23:08:35 +03:00 committed by Daniel Hahler
parent a87387d9f3
commit d3e113f997
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ local function get_offset(s, position, idx, width, height)
if position:match("left") then if position:match("left") then
v.x = ws.x + naughty.config.padding v.x = ws.x + naughty.config.padding
elseif position:match("middle") then elseif position:match("middle") then
v.x = (ws.width / 2) - (width / 2) v.x = ws.x + (ws.width / 2) - (width / 2)
else else
v.x = ws.x + ws.width - (width + naughty.config.padding) v.x = ws.x + ws.width - (width + naughty.config.padding)
end end