Fix an awesome crash when using the tasklist

This commit is contained in:
Emmanuel Lepage Vallee 2014-04-19 21:38:28 -04:00
parent 63085be479
commit 40e41d508d
1 changed files with 25 additions and 24 deletions

View File

@ -13,6 +13,7 @@ local tag = require( "awful.tag" )
local beautiful = require( "beautiful" )
local client = require( "awful.client" )
local wibox = require( "wibox" )
local surface = require( "gears.surface")
local client_menu = require("radical.impl.tasklist.client_menu")
local theme = require( "radical.theme")
@ -125,8 +126,8 @@ end
local function reload_content(c,b,a)
local item = _cache[c]
if item then
item.icon = surface(c.icon) or beautiful.tasklist_default_icon
item.text = c.name or "N/A"
item.icon = c.icon or beautiful.tasklist_default_icon
end
end
@ -142,7 +143,7 @@ local function create_client_item(c,screen)
-- Too bad, let's create a new one
local suf_w = wibox.layout.fixed.horizontal()
item = menu:add_item{text=c.name,icon=c.icon,suffix_widget=suf_w}
item = menu:add_item{text=c.name,icon=surface(c.icon),suffix_widget=suf_w}
item.add_suffix = function(w,w2)
suf_w:add(w2)
end