diff --git a/client.c b/client.c index 5724d7e0..8799fb1b 100644 --- a/client.c +++ b/client.c @@ -609,6 +609,8 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen, if(globalconf.hooks.clients != LUA_REFNIL) luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.clients, 0, 0); + luaA_class_emit_signal(globalconf.L, &client_class, "list", 0); + /* call hook */ if(globalconf.hooks.manage != LUA_REFNIL) { @@ -1099,6 +1101,8 @@ client_unmanage(client_t *c) if(globalconf.hooks.clients != LUA_REFNIL) luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.clients, 0, 0); + luaA_class_emit_signal(globalconf.L, &client_class, "list", 0); + window_state_set(c->win, XCB_WM_STATE_WITHDRAWN); titlebar_client_detach(c); @@ -1270,6 +1274,8 @@ luaA_client_swap(lua_State *L) /* Call hook to notify list change */ if(globalconf.hooks.clients != LUA_REFNIL) luaA_dofunction_from_registry(L, globalconf.hooks.clients, 0, 0); + + luaA_class_emit_signal(globalconf.L, &client_class, "list", 0); } return 0; diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index 3074ce56..2a80891d 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -133,11 +133,11 @@ end) hooks.padding.register(function(screen) on_arrange(screen) end) capi.client.add_signal("focus", function(c) on_arrange(c.screen) end) -hooks.clients.register(function() - for screen = 1, capi.screen.count() do - on_arrange(screen) - end - end) +capi.client.add_signal("list", function() + for screen = 1, capi.screen.count() do + on_arrange(screen) + end + end) hooks.tags.register(function(screen, tag, action) on_arrange(screen) end) hooks.tagged.register(function(c, tag) if not tag.screen then return end diff --git a/lib/awful/widget/tasklist.lua.in b/lib/awful/widget/tasklist.lua.in index f78ae3fc..e018d634 100644 --- a/lib/awful/widget/tasklist.lua.in +++ b/lib/awful/widget/tasklist.lua.in @@ -56,7 +56,7 @@ function new(label, buttons) local data = setmetatable({}, { __mode = 'k' }) local u = function () tasklist_update(w, buttons, label, data, widgets) end hooks.tags.register(u) - hooks.clients.register(u) + capi.client.add_signal("list", u) hooks.tagged.register(u) capi.client.add_signal("focus", u) capi.client.add_signal("unfocus", u)