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
463 B

  1. /* Selects for the view of the focused window. The list of tags */
  2. /* to be displayed is matched to the focused window tag list. */
  3. void
  4. winview(const Arg* arg)
  5. {
  6. Window win, win_r, win_p, *win_c;
  7. unsigned nc;
  8. int unused;
  9. Client* c;
  10. Arg a;
  11. if (!XGetInputFocus(dpy, &win, &unused)) return;
  12. while (XQueryTree(dpy, win, &win_r, &win_p, &win_c, &nc)
  13. && win_p != win_r) win = win_p;
  14. if (!(c = wintoclient(win))) return;
  15. a.ui = c->tags;
  16. view(&a);
  17. }