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.

44 lines
1.0 KiB

  1. int
  2. width_wintitle_floating(Bar *bar, BarArg *a)
  3. {
  4. return a->w;
  5. }
  6. int
  7. draw_wintitle_floating(Bar *bar, BarArg *a)
  8. {
  9. drw_rect(drw, a->x, a->y, a->w, a->h, 1, 1);
  10. return calc_wintitle_floating(bar->mon, a->x, a->w, -1, flextitledraw, NULL, a);
  11. }
  12. int
  13. click_wintitle_floating(Bar *bar, Arg *arg, BarArg *a)
  14. {
  15. calc_wintitle_floating(bar->mon, 0, a->w, a->x, flextitleclick, arg, a);
  16. return ClkWinTitle;
  17. }
  18. int
  19. calc_wintitle_floating(
  20. Monitor *m, int offx, int tabw, int passx,
  21. void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
  22. Arg *arg, BarArg *barg
  23. ) {
  24. Client *c;
  25. int clientsnfloating = 0, w, r;
  26. int groupactive = GRP_FLOAT;
  27. for (c = m->clients; c; c = c->next) {
  28. if (!ISVISIBLE(c) || HIDDEN(c))
  29. continue;
  30. if (c->isfloating)
  31. clientsnfloating++;
  32. }
  33. if (!clientsnfloating)
  34. return 0;
  35. w = tabw / clientsnfloating;
  36. r = tabw % clientsnfloating;
  37. c = flextitledrawarea(m, m->clients, offx, r, w, clientsnfloating, SCHEMEFOR(GRP_FLOAT), 0, 0, 1, passx, tabfn, arg, barg);
  38. return 1;
  39. }