Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
628 B

  1. void
  2. swapfocus(const Arg *arg)
  3. {
  4. if (!selmon->sel)
  5. return;
  6. if (selmon->pertag->prevclient[selmon->pertag->curtag] != NULL
  7. && ISVISIBLE(selmon->pertag->prevclient[selmon->pertag->curtag])) {
  8. focus(selmon->pertag->prevclient[selmon->pertag->curtag]);
  9. restack(selmon->pertag->prevclient[selmon->pertag->curtag]->mon);
  10. }
  11. else {
  12. Client *c = NULL;
  13. for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next);
  14. if (!c)
  15. for (c = selmon->clients; c && !ISVISIBLE(c); c = c->next);
  16. if (c) {
  17. focus(c);
  18. restack(selmon);
  19. }
  20. }
  21. }