awful.hooks: derepcate timer hook

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-06-30 15:48:59 +02:00
parent f554060ffe
commit bbb61d027a
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ local capi =
{ {
hooks = hooks hooks = hooks
} }
local util = require("awful.util")
--- Hooks module for awful --- Hooks module for awful
module("awful.hooks") module("awful.hooks")
@ -53,6 +54,7 @@ for name, hook in pairs(capi.hooks) do
_M[name] = {} _M[name] = {}
if name == 'timer' then if name == 'timer' then
_M[name].register = function (time, f, runnow) _M[name].register = function (time, f, runnow)
util.deprecate("timer object")
if type(time) ~= 'number' or type(f) ~= 'function' or time <= 0 then if type(time) ~= 'number' or type(f) ~= 'function' or time <= 0 then
return return
end end