Exemplo n.º 1
0
/** Tag a client with the tag on top of the stack.
 * \param c the client to tag
 */
void
tag_client(client_t *c)
{
    tag_t *t = luaA_object_ref_class(globalconf.L, -1, &tag_class);

    /* don't tag twice */
    if(is_client_tagged(c, t))
    {
        luaA_object_unref(globalconf.L, t);
        return;
    }

    client_array_append(&t->clients, c);
    ewmh_client_update_desktop(c);
    banning_need_update((c)->screen);

    /* call hook */
    if(globalconf.hooks.tagged != LUA_REFNIL)
    {
        luaA_object_push(globalconf.L, c);
        luaA_object_push(globalconf.L, t);
        luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.tagged, 2, 0);
    }
    tag_client_emit_signal(globalconf.L, t, c, "tagged");
}
Exemplo n.º 2
0
Arquivo: tag.c Projeto: 8ware/awesome
/** Tag a client with the tag on top of the stack.
 * \param L The Lua VM state.
 * \param c the client to tag
 */
void
tag_client(lua_State *L, client_t *c)
{
    tag_t *t = luaA_object_ref_class(L, -1, &tag_class);

    /* don't tag twice */
    if(is_client_tagged(c, t))
    {
        luaA_object_unref(L, t);
        return;
    }

    client_array_append(&t->clients, c);
    ewmh_client_update_desktop(c);
    banning_need_update();

    tag_client_emit_signal(t, c, "tagged");
}
Exemplo n.º 3
0
Arquivo: tag.c Projeto: kanru/awesome
/** Tag a client with specified tag.
 * \param c the client to tag
 * \param t the tag to tag the client with
 */
void
tag_client(client_t *c, tag_t *t)
{
    /* don't tag twice */
    if(is_client_tagged(c, t))
        return;

    tag_ref(&t);
    client_array_append(&t->clients, c);
    client_saveprops_tags(c);
    client_need_arrange(c);
    /* call hook */
    if(globalconf.hooks.tagged != LUA_REFNIL)
    {
        luaA_client_userdata_new(globalconf.L, c);
        luaA_tag_userdata_new(globalconf.L, t);
        luaA_dofunction(globalconf.L, globalconf.hooks.tagged, 2, 0);
    }
}
Exemplo n.º 4
0
Arquivo: tag.c Projeto: azuwis/awesome
/** Tag a client with the tag on top of the stack.
 * \param c the client to tag
 */
void
tag_client(client_t *c)
{
    tag_t *t = tag_ref(globalconf.L);

    /* don't tag twice */
    if(is_client_tagged(c, t))
        return;

    client_array_append(&t->clients, c);
    ewmh_client_update_desktop(c);
    client_need_arrange(c);
    /* call hook */
    if(globalconf.hooks.tagged != LUA_REFNIL)
    {
        client_push(globalconf.L, c);
        tag_push(globalconf.L, t);
        luaA_dofunction(globalconf.L, globalconf.hooks.tagged, 2, 0);
    }
}