From 9bcd87c727e84941c6fcb2db5e83b827b092f103 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 29 Jul 2015 18:50:02 +0200 Subject: [PATCH] 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. --- lib/awful/tooltip.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/awful/tooltip.lua b/lib/awful/tooltip.lua index b08b569e..4eb6b589 100644 --- a/lib/awful/tooltip.lua +++ b/lib/awful/tooltip.lua @@ -130,7 +130,9 @@ end -- `wibox.widget.textbox.set_text`. tooltip.set_text = function(self, text) self.textbox:set_text(text) - set_geometry(self) + 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) - set_geometry(self) + if self.visible then + set_geometry(self) + end end --- Change the tooltip's update interval.