From b58d0f848a23441b7cf5027e313cb3c639f290d2 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 10 Jul 2009 14:38:37 +0200 Subject: [PATCH] client: emit signal on unmanage Signed-off-by: Julien Danjou --- client.c | 3 +++ lib/awful/client.lua.in | 6 +++--- lib/awful/wibox.lua.in | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index fa6af1d78..5724d7e0a 100644 --- a/client.c +++ b/client.c @@ -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); diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in index b68df5ba1..a38c9d654 100644 --- a/lib/awful/client.lua.in +++ b/lib/awful/client.lua.in @@ -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 diff --git a/lib/awful/wibox.lua.in b/lib/awful/wibox.lua.in index af240bf71..1bba62d5b 100644 --- a/lib/awful/wibox.lua.in +++ b/lib/awful/wibox.lua.in @@ -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 })