My mods for dmenu
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 lines
496 B

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