client: emit signal on unmanage

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-07-10 14:38:37 +02:00
parent 7954f19417
commit b58d0f848a
3 changed files with 7 additions and 4 deletions

View File

@ -1092,6 +1092,9 @@ client_unmanage(client_t *c)
luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.unmanage, 1, 0); luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.unmanage, 1, 0);
} }
luaA_object_push(globalconf.L, c);
luaA_class_emit_signal(globalconf.L, &client_class, "unmanage", 1);
/* Call hook to notify list change */ /* Call hook to notify list change */
if(globalconf.hooks.clients != LUA_REFNIL) if(globalconf.hooks.clients != LUA_REFNIL)
luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.clients, 0, 0); luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.clients, 0, 0);

View File

@ -831,12 +831,12 @@ end
-- Register standards hooks -- Register standards hooks
capi.client.add_signal("focus", focus.history.add) capi.client.add_signal("focus", focus.history.add)
hooks.unmanage.register(focus.history.delete) capi.client.add_signal("unmanage", focus.history.delete)
hooks.property.register(urgent.add) hooks.property.register(urgent.add)
capi.client.add_signal("focus", urgent.delete) capi.client.add_signal("focus", urgent.delete)
hooks.unmanage.register(urgent.delete) capi.client.add_signal("unmanage", urgent.delete)
hooks.unmanage.register(floating.delete) capi.client.add_signal("unmanage", floating.delete)
-- 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

@ -379,7 +379,7 @@ end
-- Hook registered to reset all wiboxes position. -- Hook registered to reset all wiboxes position.
hooks.property.register(update_wiboxes_position) hooks.property.register(update_wiboxes_position)
capi.client.add_signal("manage", update_wiboxes_on_struts) capi.client.add_signal("manage", update_wiboxes_on_struts)
hooks.unmanage.register(update_wiboxes_on_struts) capi.client.add_signal("unmanage", update_wiboxes_on_struts)
setmetatable(_M, { __call = function(_, ...) return new(...) end }) setmetatable(_M, { __call = function(_, ...) return new(...) end })