[hackers] [dmenu] fixed fallback

From: Anselm R. Garbe <garbeam_AT_gmail.com>
Date: Sat Sep 15 20:28:51 2007

changeset: 214:9d8a7acc1793
tag: tip
user: Anselm R. Garbe <garbeam_AT_gmail.com>
date: Sat Sep 15 20:28:20 2007 +0200
summary: fixed fallback

diff -r eba01cf4a1f2 -r 9d8a7acc1793 main.c
--- a/main.c Tue Jul 24 18:19:09 2007 +0200
+++ b/main.c Sat Sep 15 20:28:20 2007 +0200
@@ -160,8 +160,10 @@ initfont(const char *fontstr) {
                 if(dc.font.xfont)
                         XFreeFont(dpy, dc.font.xfont);
                 dc.font.xfont = NULL;
- if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)))
- eprint("error, cannot load font: '%s'\n", fontstr);
+ if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))) {
+ if(!(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;
         }
Received on Sat Sep 15 2007 - 20:28:51 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:58:05 UTC