s/timer/timeout, return cur

This commit is contained in:
Daniel Hahler 2021-03-19 08:36:29 +01:00
parent f25866f4e5
commit 9301e186ef
1 changed files with 5 additions and 3 deletions

View File

@ -353,13 +353,15 @@ end
-- }}}
-- {{{ Change the timer of a registered widget.
function vicious.change_timer(reg, timer_)
function vicious.change_timer(reg, timeout)
if not reg then return end
if timer_ ~= reg.timer then
local cur = reg.timeout
if timeout ~= cur then
vicious.unregister(nil, true, reg)
reg.timer = timer_
reg.timeout = timeout
regregister(reg)
end
return cur
end
-- }}}