shifty: ensure that the sweep timer is not triggered endlessly

This commit is contained in:
Vincent Bernat 2012-10-03 21:21:54 +02:00
parent 07e2b73dd6
commit 5cd8925efe

View file

@ -715,9 +715,12 @@ function sweep()
not awful.tag.getproperty(t, "leave_kills") then
local delay = awful.tag.getproperty(t, "sweep_delay")
if delay then
local f = function()
del(t); tmr:stop()
end
local f
f = function()
del(t)
tmr:remove_signal("timeout", f)
tmr:stop()
end
tmr = capi.timer({timeout = delay})
tmr:add_signal("timeout", f)
tmr:start()