wibox.widget.systray: Special case the empty systray

Otherwise we could end up with negative size for the systray.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-05-11 17:24:01 +02:00
parent a250dcdbe1
commit 3dd0c442a0
1 changed files with 3 additions and 0 deletions

View File

@ -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