diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-09-14 15:21:16 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-09-14 15:21:16 +0200 |
commit | a9d6ea21e62ac612a18fd5f9463fccf739d2f239 (patch) | |
tree | f009d157cf689d94df729529cb87aaad5933b522 /init.lua | |
parent | 86a13946b5dd774e6e570e199fe62d310bb81bf7 (diff) | |
download | vicious-legacy-a9d6ea21e62ac612a18fd5f9463fccf739d2f239.tar.xz |
init: add connect_signal support, patch by Uli
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -117,10 +117,13 @@ local function regregister(reg) timers[reg.update] = { timer = capi.timer({ timeout = reg.timer }) } - timers[reg.update].timer:add_signal("timeout", reg.update) - -- Connect signals in development versions of awesome - --timers[reg.update].timer:connect_signal("timeout", reg.update) - timers[reg.update].timer:start() + local tm = timers[reg.update].timer + if tm.connect_signal then + tm:connect_signal("timeout", reg.update) + else + tm:add_signal("timeout", reg.update) + end + tm:start() end -- Initial update |