Xinqi Bao's Git
projects
/
dmenu.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
3e60c5d
)
simplified initfont
author
Anselm R Garbe <
[email protected]
>
Fri, 29 Aug 2008 09:09:40 +0000
(10:09 +0100)
committer
Anselm R Garbe <
[email protected]
>
Fri, 29 Aug 2008 09:09:40 +0000
(10:09 +0100)
dmenu.c
patch
|
blob
|
history
diff --git
a/dmenu.c
b/dmenu.c
index
18f2a56
..
c0addad
100644
(file)
--- a/
dmenu.c
+++ b/
dmenu.c
@@
-79,7
+79,7
@@
static unsigned int mw, mh;
static unsigned int numlockmask = 0;
static Bool running = True;
static Display *dpy;
static unsigned int numlockmask = 0;
static Bool running = True;
static Display *dpy;
-static DC dc
= {0}
;
+static DC dc;
static Item *allitems = NULL; /* first of all items */
static Item *item = NULL; /* first of pattern matching items */
static Item *sel = NULL;
static Item *allitems = NULL; /* first of all items */
static Item *item = NULL; /* first of pattern matching items */
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))
&& !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
eprint("error, cannot load font: '%s'\n", fontstr);
if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
&& !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
eprint("error, cannot load font: '%s'\n", fontstr);