awful.menu.clients: Fix client icons

This was passing c.icon as the icon of a menu entry. However, this is just a
light userdata which has to be turned into an lgi cairo surface object. Luckily,
surface.load() does that for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2012-11-25 21:18:23 +01:00
parent 574811d270
commit fbecd40c62
1 changed files with 1 additions and 4 deletions

View File

@ -509,10 +509,7 @@ function menu.entry(parent, args)
local margin = wibox.layout.margin()
margin:set_widget(label)
if args.icon then
icon = args.icon
if type(icon) == "string" then
icon = surface.load(icon)
end
icon = surface.load(args.icon)
end
if icon then
local iw = icon:get_width()