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_object_push(globalconf.L, c);
luaA_class_emit_signal(globalconf.L, &client_class, "unmanage", 1);
/* Call hook to notify list change */
if(globalconf.hooks.clients != LUA_REFNIL)
luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.clients, 0, 0);

View file

@ -831,12 +831,12 @@ end
-- Register standards hooks
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)
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

View file

@ -379,7 +379,7 @@ end
-- Hook registered to reset all wiboxes position.
hooks.property.register(update_wiboxes_position)
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 })