[hackers] [dwm] update draw.c || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Sat, 21 May 2011 21:26:54 +0200 (CEST)

changeset: 1543:ba590e72eb2a
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Sat May 21 20:26:26 2011 +0100
files: draw.c
description:
update draw.c

diff -r bbef129b96c2 -r ba590e72eb2a draw.c
--- a/draw.c Fri May 20 19:10:26 2011 +0100
+++ b/draw.c Sat May 21 20:26:26 2011 +0100
@@ -126,13 +126,13 @@
 
         if(!*fontstr)
                 return False;
- if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def))) {
+ if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def)))
                 n = XFontsOfFontSet(dc->font.set, &xfonts, &names);
- }
- else {
- dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr);
+ else if((dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr)))
                 xfonts = &dc->font.xfont;
- }
+ else
+ n = 0;
+
         for(i = 0; i < n; i++) {
                 dc->font.ascent = MAX(dc->font.ascent, xfonts[i]->ascent);
                 dc->font.descent = MAX(dc->font.descent, xfonts[i]->descent);
Received on Sat May 21 2011 - 21:26:54 CEST

This archive was generated by hypermail 2.2.0 : Sat May 21 2011 - 21:36:06 CEST