diff options
author | Anselm R Garbe <garbeam@gmail.com> | 2008-08-29 10:09:40 +0100 |
---|---|---|
committer | Anselm R Garbe <garbeam@gmail.com> | 2008-08-29 10:09:40 +0100 |
commit | ef00902fd91dba280aba605b1a812c2f0cdc3657 (patch) | |
tree | 845220e5a9d8342287ebc31d015a229e54ceaa6c | |
parent | 3e60c5d836c1f9f3b4415782de48476663943274 (diff) |
simplified initfont
-rw-r--r-- | dmenu.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -79,7 +79,7 @@ static unsigned int mw, mh; | |||
79 | static unsigned int numlockmask = 0; | 79 | static unsigned int numlockmask = 0; |
80 | static Bool running = True; | 80 | static Bool running = True; |
81 | static Display *dpy; | 81 | static Display *dpy; |
82 | static DC dc = {0}; | 82 | static DC dc; |
83 | static Item *allitems = NULL; /* first of all items */ | 83 | static Item *allitems = NULL; /* first of all items */ |
84 | static Item *item = NULL; /* first of pattern matching items */ | 84 | static Item *item = NULL; /* first of pattern matching items */ |
85 | static Item *sel = NULL; | 85 | static Item *sel = NULL; |
@@ -300,9 +300,6 @@ initfont(const char *fontstr) { | |||
300 | } | 300 | } |
301 | } | 301 | } |
302 | else { | 302 | else { |
303 | if(dc.font.xfont) | ||
304 | XFreeFont(dpy, dc.font.xfont); | ||
305 | dc.font.xfont = NULL; | ||
306 | if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)) | 303 | if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)) |
307 | && !(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) | 304 | && !(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) |
308 | eprint("error, cannot load font: '%s'\n", fontstr); | 305 | eprint("error, cannot load font: '%s'\n", fontstr); |