diff --git a/lib/awful/tooltip.lua b/lib/awful/tooltip.lua index cb490c5e2..802f0bd90 100644 --- a/lib/awful/tooltip.lua +++ b/lib/awful/tooltip.lua @@ -244,8 +244,8 @@ tooltip.new = function(args) self.background:set_fg(fg) -- Add margin. - local m_lr = args.margin_leftright or math.ceil(dpi(5)) - local m_tb = args.margin_topbottom or math.ceil(dpi(3)) + local m_lr = args.margin_leftright or dpi(5) + local m_tb = args.margin_topbottom or dpi(3) self.marginbox = wibox.layout.margin(self.background, m_lr, m_lr, m_tb, m_tb) self.wibox:set_widget(self.marginbox) diff --git a/lib/beautiful/xresources.lua b/lib/beautiful/xresources.lua index 5a41a4586..7f1766fe8 100644 --- a/lib/beautiful/xresources.lua +++ b/lib/beautiful/xresources.lua @@ -91,9 +91,9 @@ end --- Compute resulting size applying current DPI value (optionally per screen). -- @tparam number size Size -- @tparam[opt] integer s The screen. --- @treturn number Resulting size +-- @treturn integer Resulting size (using `math.ceil`). function xresources.apply_dpi(size, s) - return size/96*xresources.get_dpi(s) + return math.ceil(size/96*xresources.get_dpi(s)) end return xresources