From fbecd40c62ecf46deac8b57704dc1474bbf9be2a Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 25 Nov 2012 21:18:23 +0100 Subject: [PATCH] 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 --- lib/awful/menu.lua.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index d7d6d177a..cd97dddeb 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -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()