focusurgent.c 279 B

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