diff --git a/lib/wibox/widget/textbox.lua.in b/lib/wibox/widget/textbox.lua.in index 7578f3e0..4ebd31ad 100644 --- a/lib/wibox/widget/textbox.lua.in +++ b/lib/wibox/widget/textbox.lua.in @@ -45,6 +45,11 @@ end function textbox:fit(width, height) setup_layout(self, width, height) local ink, logical = self._layout:get_pixel_extents() + + if logical.width == 0 or logical.height == 0 then + return 0, 0 + end + return logical.width, logical.height end