X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=draw.c;h=a3c526ede838a242392fa05987761669938eb3f8;hp=cf7f14e202c91c5d440ea53f3852be56a8147280;hb=83d23908d3438d7f1f62533a7c8d96fc1019df55;hpb=39677ec76616fe4165ef92afb14db2bef2488e30 diff --git a/draw.c b/draw.c index cf7f14e..a3c526e 100644 --- a/draw.c +++ b/draw.c @@ -116,7 +116,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr) char **missing, *def; int n; - missing = 0; + missing = NULL; def = "?"; setlocale(LC_ALL, ""); if(font->set) @@ -128,7 +128,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr) XFreeStringList(missing); if(font->set) { XFreeFontSet(dpy, font->set); - font->set = 0; + font->set = NULL; } } if(font->set) { @@ -151,7 +151,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr) else { if(font->xfont) XFreeFont(dpy, font->xfont); - font->xfont = 0; + font->xfont = NULL; font->xfont = XLoadQueryFont(dpy, fontstr); if (!font->xfont) font->xfont = XLoadQueryFont(dpy, "fixed"); @@ -162,3 +162,9 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr) } font->height = font->ascent + font->descent; } + +unsigned int +labelheight(Fnt *font) +{ + return font->height + 4; +}