lib/awful/hooks: fix removal of last timer hook

Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Gregor Best 2009-02-24 18:39:21 +01:00 committed by Julien Danjou
parent 84b75524ee
commit 75b4f04251
1 changed files with 1 additions and 0 deletions

View File

@ -112,6 +112,7 @@ for name, hook in pairs(capi.hooks) do
end end
table.sort(delays) table.sort(delays)
_M[name].timer = delays[1] _M[name].timer = delays[1]
if not delays[1] then delays[1] = 0 end
hook(delays[1], function (...) hook(delays[1], function (...)
for i, callback in ipairs(_M[name].callbacks) do for i, callback in ipairs(_M[name].callbacks) do
callback['counter'] = callback['counter'] + _M[name].timer callback['counter'] = callback['counter'] + _M[name].timer