Ejemplo n.º 1
0
Archivo: tag.c Proyecto: 8ware/awesome
/** Untag a client with specified tag.
 * \param c the client to tag
 * \param t the tag to tag the client with
 */
void
untag_client(client_t *c, tag_t *t)
{
    for(int i = 0; i < t->clients.len; i++)
        if(t->clients.tab[i] == c)
        {
            lua_State *L = globalconf_get_lua_State();
            client_array_take(&t->clients, i);
            banning_need_update();
            ewmh_client_update_desktop(c);
            tag_client_emit_signal(t, c, "untagged");
            luaA_object_unref(L, t);
            return;
        }
}
Ejemplo n.º 2
0
Archivo: tag.c Proyecto: azuwis/awesome
/** Untag a client with specified tag.
 * \param c the client to tag
 * \param t the tag to tag the client with
 */
void
untag_client(client_t *c, tag_t *t)
{
    for(int i = 0; i < t->clients.len; i++)
        if(t->clients.tab[i] == c)
        {
            client_need_arrange(c);
            client_array_take(&t->clients, i);
            ewmh_client_update_desktop(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);
            }
            tag_unref(globalconf.L, t);
            return;
        }
}
Ejemplo n.º 3
0
Archivo: tag.c Proyecto: kanru/awesome
/** Untag a client with specified tag.
 * \param c the client to tag
 * \param t the tag to tag the client with
 */
void
untag_client(client_t *c, tag_t *t)
{
    for(int i = 0; i < t->clients.len; i++)
        if(t->clients.tab[i] == c)
        {
            client_need_arrange(c);
            client_array_take(&t->clients, i);
            client_saveprops_tags(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);
            }
            tag_unref(&t);
            return;
        }
}
Ejemplo n.º 4
0
/** Untag a client with specified tag.
 * \param c the client to tag
 * \param t the tag to tag the client with
 */
void
untag_client(client_t *c, tag_t *t)
{
    for(int i = 0; i < t->clients.len; i++)
        if(t->clients.tab[i] == c)
        {
            client_array_take(&t->clients, i);
            banning_need_update((c)->screen);
            ewmh_client_update_desktop(c);
            /* 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, "untagged");
            luaA_object_unref(globalconf.L, t);
            return;
        }
}