From 3dd0c442a031f174000950981154139879933ab0 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 11 May 2014 17:24:01 +0200 Subject: [PATCH] wibox.widget.systray: Special case the empty systray Otherwise we could end up with negative size for the systray. Signed-off-by: Uli Schlachter --- lib/wibox/widget/systray.lua.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/wibox/widget/systray.lua.in b/lib/wibox/widget/systray.lua.in index dc59590d3..f0ae9a82a 100644 --- a/lib/wibox/widget/systray.lua.in +++ b/lib/wibox/widget/systray.lua.in @@ -48,6 +48,9 @@ function systray:fit(width, height) local num_entries = capi.awesome.systray() local base = base_size local spacing = beautiful.systray_icon_spacing or 0 + if num_entries == 0 then + return 0, 0 + end if base == nil then if width < height then base = width