From 7cbf3e8beea159ef7b482ba9c447f58978deeb73 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 22 Sep 2015 13:13:08 +0200 Subject: [PATCH] Fix tooltip.set_geometry: provide textbox context Closes https://github.com/awesomeWM/awesome/pull/467. --- lib/awful/tooltip.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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