aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarg@suckless.org <unknown>2007-09-19 17:33:35 +0200
committerarg@suckless.org <unknown>2007-09-19 17:33:35 +0200
commit56f9e26b7268d653afb6db82aac9bad71abde0dd (patch)
tree997d9c143e3f59a2fdedca7bb3585386796f0103
parentd094ebea968e3d08b985a754aa9df30f56f649c6 (diff)
downloaddmenu-56f9e26b7268d653afb6db82aac9bad71abde0dd.tar.gz
dmenu-56f9e26b7268d653afb6db82aac9bad71abde0dd.tar.bz2
dmenu-56f9e26b7268d653afb6db82aac9bad71abde0dd.zip
applied yiyus initfont fix
-rw-r--r--dmenu.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/dmenu.c b/dmenu.c
index 34df9ed..5cb638b 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -298,10 +298,9 @@ initfont(const char *fontstr) {
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, "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);
dc.font.ascent = dc.font.xfont->ascent;
dc.font.descent = dc.font.xfont->descent;
}