client: emit object signals rather than class ones

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-10-13 15:41:31 +02:00 committed by Uli Schlachter
parent 3bdd4793d7
commit b5e5d1f2a0
1 changed files with 11 additions and 5 deletions

View File

@ -189,7 +189,8 @@ client_unfocus_update(client_t *c)
globalconf.client_focus = NULL; globalconf.client_focus = NULL;
luaA_object_push(globalconf.L, c); luaA_object_push(globalconf.L, c);
luaA_class_emit_signal(globalconf.L, &client_class, "unfocus", 1); luaA_object_emit_signal(globalconf.L, -1, "unfocus", 0);
lua_pop(globalconf.L, 1);
} }
/** Unfocus a client. /** Unfocus a client.
@ -317,7 +318,9 @@ client_focus_update(client_t *c)
luaA_object_push(globalconf.L, c); luaA_object_push(globalconf.L, c);
client_set_urgent(globalconf.L, -1, false); client_set_urgent(globalconf.L, -1, false);
luaA_class_emit_signal(globalconf.L, &client_class, "focus", 1); luaA_object_push(globalconf.L, c);
luaA_object_emit_signal(globalconf.L, -1, "focus", 0);
lua_pop(globalconf.L, 1);
} }
/** Give focus to client, or to first client if client is NULL. /** Give focus to client, or to first client if client is NULL.
@ -528,9 +531,11 @@ HANDLE_GEOM(height)
luaA_class_emit_signal(globalconf.L, &client_class, "list", 0); luaA_class_emit_signal(globalconf.L, &client_class, "list", 0);
/* client is still on top of the stack; push startup value, /* client is still on top of the stack; push startup value,
* and emit signals with 2 args */ * and emit signals with one arg */
lua_pushboolean(globalconf.L, startup); lua_pushboolean(globalconf.L, startup);
luaA_class_emit_signal(globalconf.L, &client_class, "manage", 2); luaA_object_emit_signal(globalconf.L, -2, "manage", 1);
/* pop client */
lua_pop(globalconf.L, 1);
} }
/** Compute client geometry with respect to its geometry hints. /** Compute client geometry with respect to its geometry hints.
@ -961,7 +966,8 @@ client_unmanage(client_t *c)
untag_client(c, tags->tab[i]); untag_client(c, tags->tab[i]);
luaA_object_push(globalconf.L, c); luaA_object_push(globalconf.L, c);
luaA_class_emit_signal(globalconf.L, &client_class, "unmanage", 1); luaA_object_emit_signal(globalconf.L, -1, "unmanage", 0);
lua_pop(globalconf.L, 1);
luaA_class_emit_signal(globalconf.L, &client_class, "list", 0); luaA_class_emit_signal(globalconf.L, &client_class, "list", 0);