debug: some applications don't have a name

For example, when not playing, the new version of Spotify doesn't expose
a name. Handle that when displaying window information.
This commit is contained in:
Vincent Bernat 2015-07-12 09:55:49 +02:00
parent eafed94545
commit db2d169a57

View file

@ -74,7 +74,7 @@ local function dbg_get(var, depth, indent)
end end
else else
if vtype == "tag" or vtype == "client" then if vtype == "tag" or vtype == "client" then
name = " [<span color='"..colors.name.."'>" .. var.name:sub(1,10) .. "</span>]" name = " [<span color='"..colors.name.."'>" .. (var.name or ''):sub(1,10) .. "</span>]"
end end
text = text .. vstring .. name or "" text = text .. vstring .. name or ""
end end