My dmenu build
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.
 
 
 
 
 
 

17 regels
496 B

  1. /* See LICENSE file for copyright and license details. */
  2. #include <X11/Xlib.h>
  3. #include "draw.h"
  4. void
  5. setupdraw(DC *dc, Window w) {
  6. XWindowAttributes wa;
  7. XGetWindowAttributes(dc->dpy, w, &wa);
  8. dc->drawable = XCreatePixmap(dc->dpy, w, wa.width, wa.height,
  9. DefaultDepth(dc->dpy, DefaultScreen(dc->dpy)));
  10. dc->gc = XCreateGC(dc->dpy, w, 0, NULL);
  11. XSetLineAttributes(dc->dpy, dc->gc, 1, LineSolid, CapButt, JoinMiter);
  12. if(!dc->font.set)
  13. XSetFont(dc->dpy, dc->gc, dc->font.xfont->fid);
  14. }