Example #1
0
File: tag.c Project: wavebeem/wmfs
/* Transfert a client to a tag
 * \param c Client pointer
 * \param tag Tag
*/
void
tag_transfert(Client *c, int tag)
{
     screen_get_sel();

     CHECK(c);

     if(tag <= 0)
          tag = 1;

     if(tag > conf.ntag[selscreen])
          return;

     c->tag = tag;
     c->screen = selscreen;

     arrange(c->screen, True);

     client_focus_next(c);

     client_update_attributes(c);

     tags[c->screen][tag].request_update = True;

     return;
}
Example #2
0
/** Move a client from one tag to another with dah mouse
 *\param c client pointer
 */
static void
mouse_move_tag_client(Client *c)
{
     Window w;
     int i, d, s;

     if(!(c->flags & TileFlag) && !(c->flags & LMaxFlag))
          return;

     s = c->screen;

     XQueryPointer(dpy, infobar[selscreen].tags_board->win, &w, &w, &d, &d, &d, &d, (uint*)&d);

     for(i = 1; i < conf.ntag[selscreen] + 1; ++i)
          if(infobar[selscreen].tags[i]->win == w
             && tags[selscreen][i].layout.func != freelayout)
          {
               c->screen = selscreen;
               c->tag = i;
               tags[c->screen][c->tag].request_update = True;
               arrange(s, True);

               if(s != c->screen)
                    arrange(c->screen, True);
          }

     client_focus_next(c);

     return;
}