From d3e113f997b74d770c2d24356eb3acdc65b1c59e Mon Sep 17 00:00:00 2001 From: paul-axe Date: Sat, 15 Apr 2017 23:08:35 +0300 Subject: [PATCH] naughty: fix offset calculation for *_middle position (#1727) --- lib/naughty/core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/naughty/core.lua b/lib/naughty/core.lua index abe0696c3..98afd2e84 100644 --- a/lib/naughty/core.lua +++ b/lib/naughty/core.lua @@ -274,7 +274,7 @@ local function get_offset(s, position, idx, width, height) if position:match("left") then v.x = ws.x + naughty.config.padding elseif position:match("middle") then - v.x = (ws.width / 2) - (width / 2) + v.x = ws.x + (ws.width / 2) - (width / 2) else v.x = ws.x + ws.width - (width + naughty.config.padding) end