diff --git a/lib/awful/tooltip.lua b/lib/awful/tooltip.lua index 7a410f33a..91e377245 100644 --- a/lib/awful/tooltip.lua +++ b/lib/awful/tooltip.lua @@ -82,8 +82,9 @@ end -- @tparam tooltip self A tooltip object. local function set_geometry(self) local my_geo = self.wibox:geometry() + local textbox_context = {dpi=beautiful.xresources.get_dpi(mouse.screen)} -- calculate width / height - local n_w, n_h = self.textbox:fit(nil, -1, -1) -- Hack! :( + local n_w, n_h = self.textbox:fit(textbox_context, -1, -1) -- Hack! :( n_w = n_w + self.marginbox.left + self.marginbox.right n_h = n_h + self.marginbox.top + self.marginbox.bottom if my_geo.width ~= n_w or my_geo.height ~= n_h then