wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

freeimage.c (333B)


      1 /* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include "../x11.h"
      5 
      6 void
      7 freeimage(Image *img) {
      8 	if(img == nil)
      9 		return;
     10 
     11 	assert(img->type == WImage);
     12 
     13 	if(img->xft)
     14 		xft->drawdestroy(img->xft);
     15 	XFreePixmap(display, img->xid);
     16 	XFreeGC(display, img->gc);
     17 	free(img);
     18 }