This commit is contained in:
Daniel Hahler 2015-02-15 12:42:16 +01:00
parent 31cd35f97a
commit d0f9fced71
2 changed files with 12 additions and 2 deletions

View File

@ -287,14 +287,23 @@ luaA_object_emit_signal(lua_State *L, int oud,
int nbfunc = sigfound->sigfuncs.len;
luaL_checkstack(L, nbfunc + nargs + 2, "too much signal");
/* if( name != "refresh" ) { */
const char *objname = lua_tostring(L, oud_abs);
debug("Emitting signal '%s' on %s (%d funcs)", name, objname, nbfunc);
luaA_dumpstack(L);
/* } */
/* Push all functions and then execute, because this list can change
* while executing funcs. */
foreach(func, sigfound->sigfuncs)
luaA_object_push_item(L, oud_abs, *func);
/* lua_pushvalue(L, oud_abs); */
/* lua_class = luaA_class_get(L, oud_abs); */
/* luaA_object_tostring_idx(L, oud_abs); */
/* const char *objname = lua_tostring(L, -1); */
/* lua_pop(L, 1); */
for(int i = 0; i < nbfunc; i++)
{
/* push object */

View File

@ -223,6 +223,7 @@ end
local delayed_calls = {}
capi.awesome.connect_signal("refresh", function()
for _, callback in ipairs(delayed_calls) do
print("D: awesome: delayed_call: " .. tostring(callback[1]))
protected_call(unpack(callback))
end
delayed_calls = {}