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.

54 lines
1.4 KiB

  1. diff --git a/tabbed.c b/tabbed.c
  2. index eafe28a..b0b9662 100644
  3. --- a/tabbed.c
  4. +++ b/tabbed.c
  5. @@ -152,7 +152,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = {
  6. [MapRequest] = maprequest,
  7. [PropertyNotify] = propertynotify,
  8. };
  9. -static int bh, obh, wx, wy, ww, wh;
  10. +static int bh, obh, wx, wy, ww, wh, vbh;
  11. static unsigned int numlockmask;
  12. static Bool running = True, nextfocus, doinitspawn = True,
  13. fillagain = False, closelastclient = False,
  14. @@ -324,7 +324,7 @@ void
  15. drawbar(void)
  16. {
  17. XftColor *col;
  18. - int c, cc, fc, width;
  19. + int c, cc, fc, width, nbh, i;
  20. char *name = NULL;
  21. if (nclients == 0) {
  22. @@ -332,12 +332,21 @@ drawbar(void)
  23. dc.w = ww;
  24. XFetchName(dpy, win, &name);
  25. drawtext(name ? name : "", dc.norm);
  26. - XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, bh, 0, 0);
  27. + XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, vbh, 0, 0);
  28. XSync(dpy, False);
  29. return;
  30. }
  31. + nbh = nclients > 1 ? vbh : 0;
  32. + if (bh != nbh) {
  33. + bh = nbh;
  34. + for (i = 0; i < nclients; i++)
  35. + XMoveResizeWindow(dpy, clients[i]->win, 0, bh, ww, wh - bh);
  36. + }
  37. + if (bh == 0)
  38. + return;
  39. +
  40. width = ww;
  41. cc = ww / tabwidth;
  42. if (nclients > cc)
  43. @@ -984,7 +993,7 @@ setup(void)
  44. screen = DefaultScreen(dpy);
  45. root = RootWindow(dpy, screen);
  46. initfont(font);
  47. - bh = dc.h = dc.font.height + 2;
  48. + vbh = dc.h = dc.font.height + 2;
  49. /* init atoms */
  50. wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);