From 56f2fcfccc42d6ce775c59bf9ecb1263b7a80c9a Mon Sep 17 00:00:00 2001 From: erik-f <44124897+erik-f@users.noreply.github.com> Date: Fri, 27 Dec 2019 12:36:54 +0100 Subject: [PATCH] wibox.container.margin: Allow nonnegative dimensions Commit f025409 avoided negative dimensions but also stopped allowing width and height to be zero. For widgets like awful.widget.watch it is reasonable to allow dimensions to be zero because in many cases when the margin container is being calculated the watch widget is still computing and therefore has width and height zero. --- lib/wibox/container/margin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wibox/container/margin.lua b/lib/wibox/container/margin.lua index 66ca3a456..5d37fb495 100644 --- a/lib/wibox/container/margin.lua +++ b/lib/wibox/container/margin.lua @@ -48,7 +48,7 @@ function margin:layout(_, width, height) local resulting_width = width - x - w local resulting_height = height - y - h - if resulting_width > 0 and resulting_height > 0 then + if resulting_width >= 0 and resulting_height >= 0 then return { base.place_widget_at(self._private.widget, x, y, resulting_width, resulting_height) } end end