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.
This commit is contained in:
Daniel Hahler 2015-08-14 15:34:54 +02:00
parent 66c4ff7f2c
commit 05da320c28
1 changed files with 4 additions and 0 deletions

View File

@ -275,6 +275,10 @@ tooltip.new = function(args)
-- emit the release event on an underlying object, e.g. the titlebar icon. -- emit the release event on an underlying object, e.g. the titlebar icon.
self.wibox:buttons(abutton({}, 1, nil, function() data[self].hide() end)) 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 -- Add tooltip to objects
if args.objects then if args.objects then
for _, object in ipairs(args.objects) do for _, object in ipairs(args.objects) do