dwm.c
changeset 1446 c3ea02998d91
parent 1445 4ad1f24d38ec
child 1447 4fff5050c835
equal deleted inserted replaced
1445:4ad1f24d38ec 1446:c3ea02998d91
   623 
   623 
   624 Monitor *
   624 Monitor *
   625 dirtomon(int dir) {
   625 dirtomon(int dir) {
   626 	Monitor *m = NULL;
   626 	Monitor *m = NULL;
   627 
   627 
   628 	if(dir > 0)
   628 	if(dir > 0) {
   629 		if(!(m = selmon->next))
   629 		if(!(m = selmon->next))
   630 			m = mons;
   630 			m = mons;
       
   631 	}
   631 	else {
   632 	else {
   632 		if(selmon == mons)
   633 		if(selmon == mons)
   633 			for(m = mons; m->next; m = m->next);
   634 			for(m = mons; m->next; m = m->next);
   634 		else
   635 		else
   635 			for(m = mons; m->next != selmon; m = m->next);
   636 			for(m = mons; m->next != selmon; m = m->next);
  1519 }
  1520 }
  1520 
  1521 
  1521 void
  1522 void
  1522 tagmon(const Arg *arg) {
  1523 tagmon(const Arg *arg) {
  1523 	if(!selmon->sel || !mons->next)
  1524 	if(!selmon->sel || !mons->next)
  1524 		return
  1525 		return;
  1525 	sendmon(selmon->sel, dirtomon(arg->i));
  1526 	sendmon(selmon->sel, dirtomon(arg->i));
  1526 }
  1527 }
  1527 
  1528 
  1528 int
  1529 int
  1529 textnw(const char *text, unsigned int len) {
  1530 textnw(const char *text, unsigned int len) {