Browse Source

simplified initfont

master
Anselm R Garbe 16 years ago
parent
commit
ef00902fd9
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      dmenu.c

+ 1
- 4
dmenu.c View File

@ -79,7 +79,7 @@ static unsigned int mw, mh;
static unsigned int numlockmask = 0; static unsigned int numlockmask = 0;
static Bool running = True; static Bool running = True;
static Display *dpy; static Display *dpy;
static DC dc = {0};
static DC dc;
static Item *allitems = NULL; /* first of all items */ static Item *allitems = NULL; /* first of all items */
static Item *item = NULL; /* first of pattern matching items */ static Item *item = NULL; /* first of pattern matching items */
static Item *sel = NULL; static Item *sel = NULL;
@ -300,9 +300,6 @@ initfont(const char *fontstr) {
} }
} }
else { else {
if(dc.font.xfont)
XFreeFont(dpy, dc.font.xfont);
dc.font.xfont = NULL;
if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)) if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
&& !(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) && !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
eprint("error, cannot load font: '%s'\n", fontstr); eprint("error, cannot load font: '%s'\n", fontstr);


Loading…
Cancel
Save