dwm

dynamic window manager
git clone https://git.parazyd.org/dwm
Log | Files | Refs | README | LICENSE

focusurgent.c (292B)


      1 static void
      2 focusurgent(const Arg *arg) {
      3 	Client *c;
      4 	int i;
      5 
      6 	for (c = selmon->clients; c && !c->isurgent; c = c->next);
      7 	if (c) {
      8 		for (i = 0; i < LENGTH(tags) && !((1 << i) & c->tags); i++);
      9 		if (i < LENGTH(tags)) {
     10 			const Arg a = { .ui = 1 << i };
     11 			view(&a);
     12 			focus(c);
     13 		}
     14 	}
     15 }