diff --git a/lib/gears/timer.lua b/lib/gears/timer.lua index b8ab26fb8..5606b87a4 100644 --- a/lib/gears/timer.lua +++ b/lib/gears/timer.lua @@ -205,12 +205,11 @@ function timer.new(args) end if args.callback then - if args.call_now then - args.callback() - end ret:connect_signal("timeout", args.callback) end - + if args.call_now then + ret:emit_signal("timeout") + end if args.single_shot then ret:connect_signal("timeout", function() ret:stop() end) end