From 5cd8925efe323d53828e3d1d6abb8ace916a76b7 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 3 Oct 2012 21:21:54 +0200 Subject: [PATCH] shifty: ensure that the sweep timer is not triggered endlessly --- lib/shifty.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/shifty.lua b/lib/shifty.lua index 54deca0..25e110c 100644 --- a/lib/shifty.lua +++ b/lib/shifty.lua @@ -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()