dwm.c.rej 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --- dwm.c
  2. +++ dwm.c
  3. @@ -119,6 +119,10 @@ struct Monitor {
  4. int by; /* bar geometry */
  5. int mx, my, mw, mh; /* screen size */
  6. int wx, wy, ww, wh; /* window area */
  7. + int gappih; /* horizontal gap between windows */
  8. + int gappiv; /* vertical gap between windows */
  9. + int gappoh; /* horizontal outer gaps */
  10. + int gappov; /* vertical outer gaps */
  11. unsigned int seltags;
  12. unsigned int sellt;
  13. unsigned int tagset[2];
  14. @@ -637,6 +640,10 @@ createmon(void)
  15. m->nmaster = nmaster;
  16. m->showbar = showbar;
  17. m->topbar = topbar;
  18. + m->gappih = gappih;
  19. + m->gappiv = gappiv;
  20. + m->gappoh = gappoh;
  21. + m->gappov = gappov;
  22. m->lt[0] = &layouts[0];
  23. m->lt[1] = &layouts[1 % LENGTH(layouts)];
  24. strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
  25. @@ -1669,32 +1676,6 @@ tagmon(const Arg *arg)
  26. sendmon(selmon->sel, dirtomon(arg->i));
  27. }
  28. -void
  29. -tile(Monitor *m)
  30. -{
  31. - unsigned int i, n, h, mw, my, ty;
  32. - Client *c;
  33. -
  34. - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
  35. - if (n == 0)
  36. - return;
  37. -
  38. - if (n > m->nmaster)
  39. - mw = m->nmaster ? m->ww * m->mfact : 0;
  40. - else
  41. - mw = m->ww;
  42. - for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
  43. - if (i < m->nmaster) {
  44. - h = (m->wh - my) / (MIN(n, m->nmaster) - i);
  45. - resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
  46. - my += HEIGHT(c);
  47. - } else {
  48. - h = (m->wh - ty) / (n - i);
  49. - resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
  50. - ty += HEIGHT(c);
  51. - }
  52. -}
  53. -
  54. void
  55. togglebar(const Arg *arg)
  56. {