dwm

Suckless' dwm with my personal patches
git clone https://git.instinctive.eu/dwm.git
Log | Files | Refs | README | LICENSE

focusurgent.c (420B)


      1 static void
      2 focusurgent(const Arg *arg) {
      3 	Monitor *m;
      4 	Client *c;
      5 	int i;
      6 	for(m=mons; m; m=m->next){
      7 		for(c=m->clients; c && !c->isurgent; c=c->next);
      8 		if(c) {
      9 			if (selmon->sel) unfocus(selmon->sel, 0);
     10 			selmon = m;
     11 			for(i=0; i < LENGTH(tags) && !((1 << i) & c->tags); i++);
     12 			if(i < LENGTH(tags)) {
     13 				const Arg a = {.ui = 1 << i};
     14 				view(&a);
     15 				focus(c);
     16 				restack(c->mon);
     17 				return;
     18 			}
     19 		}
     20 	}
     21 }