init: add connect_signal support, patch by Uli

This commit is contained in:
Adrian C. (anrxc) 2010-09-14 15:21:16 +02:00
parent 86a13946b5
commit a9d6ea21e6
1 changed files with 7 additions and 4 deletions

View File

@ -117,10 +117,13 @@ local function regregister(reg)
timers[reg.update] = { timers[reg.update] = {
timer = capi.timer({ timeout = reg.timer }) timer = capi.timer({ timeout = reg.timer })
} }
timers[reg.update].timer:add_signal("timeout", reg.update) local tm = timers[reg.update].timer
-- Connect signals in development versions of awesome if tm.connect_signal then
--timers[reg.update].timer:connect_signal("timeout", reg.update) tm:connect_signal("timeout", reg.update)
timers[reg.update].timer:start() else
tm:add_signal("timeout", reg.update)
end
tm:start()
end end
-- Initial update -- Initial update