summaryrefslogtreecommitdiff
path: root/draw/cleanupdraw.c
blob: 28bce137f162ba573f1d67615b60cd9ce6d01eac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* See LICENSE file for copyright and license details. */
#include <X11/Xlib.h>
#include "draw.h"

void
cleanupdraw(DC *dc) {
	if(dc->font.set)
		XFreeFontSet(dc->dpy, dc->font.set);
	else
		XFreeFont(dc->dpy, dc->font.xfont);
	XFreePixmap(dc->dpy, dc->drawable);
	XFreeGC(dc->dpy, dc->gc);
}