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.

29 lines
664 B

  1. /*
  2. * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
  3. * See LICENSE file for license details.
  4. */
  5. #include "wm.h"
  6. void
  7. draw_bar()
  8. {
  9. brush.x = brush.y = 0;
  10. brush.w = bw;
  11. brush.h = bh;
  12. draw(dpy, &brush, False, NULL);
  13. if(stack) {
  14. brush.w = textw(&brush.font, stack->name) + bh;
  15. swap((void **)&brush.fg, (void **)&brush.bg);
  16. draw(dpy, &brush, True, stack->name);
  17. swap((void **)&brush.fg, (void **)&brush.bg);
  18. brush.x += brush.w;
  19. }
  20. brush.w = textw(&brush.font, statustext) + bh;
  21. brush.x = bx + bw - brush.w;
  22. draw(dpy, &brush, False, statustext);
  23. XCopyArea(dpy, brush.drawable, barwin, brush.gc, 0, 0, bw, bh, 0, 0);
  24. XFlush(dpy);
  25. }