fix invalid object errors (steam)
This commit is contained in:
parent
9083b39327
commit
51fbad9e27
4
init.lua
4
init.lua
|
@ -66,7 +66,9 @@ local function setup(config)
|
||||||
client.connect_signal("manage", function(c)
|
client.connect_signal("manage", function(c)
|
||||||
-- set icon based on c.class
|
-- set icon based on c.class
|
||||||
awful.spawn.easy_async_with_shell("sleep " .. delay, function()
|
awful.spawn.easy_async_with_shell("sleep " .. delay, function()
|
||||||
|
if c and c.valid and icons[c.class] then
|
||||||
set_icon(c, icons[c.class])
|
set_icon(c, icons[c.class])
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if len(dynamic_icons) == 0 then
|
if len(dynamic_icons) == 0 then
|
||||||
|
@ -94,8 +96,10 @@ return setmetatable(module, { __call = function(_, ...)
|
||||||
-- we also have to manually emit a fake "property::name" signal to update dynamic icons.
|
-- we also have to manually emit a fake "property::name" signal to update dynamic icons.
|
||||||
awful.spawn.easy_async_with_shell("sleep " .. delay, function()
|
awful.spawn.easy_async_with_shell("sleep " .. delay, function()
|
||||||
for _, c in ipairs(client.get()) do
|
for _, c in ipairs(client.get()) do
|
||||||
|
if c and c.valid and icons[c.class] then
|
||||||
set_icon(c, icons[c.class])
|
set_icon(c, icons[c.class])
|
||||||
c:emit_signal("property::name")
|
c:emit_signal("property::name")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end })
|
end })
|
||||||
|
|
Loading…
Reference in New Issue