awful.tooltip: skip set_geometry if not visible

`set_geometry` will be called in `show`, and is not necessary when the
tooltip is not visible.
This commit is contained in:
Daniel Hahler 2015-07-29 18:50:02 +02:00
parent 65e9d6d59f
commit 9bcd87c727
1 changed files with 6 additions and 2 deletions

View File

@ -130,7 +130,9 @@ end
-- `wibox.widget.textbox.set_text`.
tooltip.set_text = function(self, text)
self.textbox:set_text(text)
if self.visible then
set_geometry(self)
end
end
--- Change displayed text.
@ -140,7 +142,9 @@ end
-- `wibox.widget.textbox.set_markup`.
tooltip.set_markup = function(self, text)
self.textbox:set_markup(text)
if self.visible then
set_geometry(self)
end
end
--- Change the tooltip's update interval.