init: emit timeout instead of forced update

This commit is contained in:
Adrian C. (anrxc) 2010-10-09 10:03:21 +02:00
parent fbd2af7b15
commit 932bd8dfcb
1 changed files with 4 additions and 3 deletions

View File

@ -119,6 +119,7 @@ local function regregister(reg)
timers[reg.update] = { timers[reg.update] = {
timer = capi.timer({ timeout = reg.timer }) timer = capi.timer({ timeout = reg.timer })
} }
local tm = timers[reg.update].timer local tm = timers[reg.update].timer
if tm.connect_signal then if tm.connect_signal then
tm:connect_signal("timeout", reg.update) tm:connect_signal("timeout", reg.update)
@ -126,10 +127,10 @@ local function regregister(reg)
tm:add_signal("timeout", reg.update) tm:add_signal("timeout", reg.update)
end end
tm:start() tm:start()
end
-- Initial update -- Initial update
reg.update() tm:emit_signal("timeout")
end
reg.running = true reg.running = true
end end
end end