client: emit signal on unfocus

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-07-10 12:44:57 +02:00
parent 391e3ea954
commit c353970500
4 changed files with 5 additions and 3 deletions

View File

@ -178,6 +178,8 @@ client_unfocus_update(client_t *c)
luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.unfocus, 1, 0); luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.unfocus, 1, 0);
} }
luaA_object_push(globalconf.L, c);
luaA_class_emit_signal(globalconf.L, &client_class, "unfocus", 1);
} }
/** Unfocus a client. /** Unfocus a client.

View File

@ -410,7 +410,7 @@ button_groups = { close_buttons,
-- Register standards hooks -- Register standards hooks
capi.client.add_signal("focus", update) capi.client.add_signal("focus", update)
hooks.unfocus.register(update) capi.client.add_signal("unfocus", update)
hooks.property.register(update) hooks.property.register(update)
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

View File

@ -66,7 +66,7 @@ function new(screen, label, buttons)
end end
local uc = function (c) return u(c.screen) end local uc = function (c) return u(c.screen) end
capi.client.add_signal("focus", uc) capi.client.add_signal("focus", uc)
hooks.unfocus.register(uc) capi.client.add_signal("unfocus", uc)
hooks.tags.register(u) hooks.tags.register(u)
hooks.tagged.register(uc) hooks.tagged.register(uc)
hooks.property.register(function (c, prop) hooks.property.register(function (c, prop)

View File

@ -59,7 +59,7 @@ function new(label, buttons)
hooks.clients.register(u) hooks.clients.register(u)
hooks.tagged.register(u) hooks.tagged.register(u)
capi.client.add_signal("focus", u) capi.client.add_signal("focus", u)
hooks.unfocus.register(u) capi.client.add_signal("unfocus", u)
hooks.property.register(function (c, prop) hooks.property.register(function (c, prop)
if type(c) ~= "client" then return end if type(c) ~= "client" then return end
if prop == "urgent" if prop == "urgent"