From 05da320c28cfc0c887ce068d0ca5f732694ff536 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 14 Aug 2015 15:34:54 +0200 Subject: [PATCH] tooltips: re-place them on width/height changes If the dimensions of a tooltip change, e.g. after the text has been changed, they are now placed again. --- lib/awful/tooltip.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/awful/tooltip.lua b/lib/awful/tooltip.lua index dd0f1c28..3e40308b 100644 --- a/lib/awful/tooltip.lua +++ b/lib/awful/tooltip.lua @@ -275,6 +275,10 @@ tooltip.new = function(args) -- emit the release event on an underlying object, e.g. the titlebar icon. self.wibox:buttons(abutton({}, 1, nil, function() data[self].hide() end)) + -- Re-place when the geometry of the wibox changes. + self.wibox:connect_signal("property::width", function() place(self) end) + self.wibox:connect_signal("property::height", function() place(self) end) + -- Add tooltip to objects if args.objects then for _, object in ipairs(args.objects) do