[hackers] [dmenu] simplified initfont || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Fri, 29 Aug 2008 09:11:36 +0000 (UTC)

changeset: 279:21a1ed9a69b9
tag: tip
user: Anselm R Garbe <garbeam_AT_gmail.com>
date: Fri Aug 29 10:09:40 2008 +0100
files: dmenu.c
description:
simplified initfont

diff -r 9eab432907a0 -r 21a1ed9a69b9 dmenu.c
--- a/dmenu.c Mon Aug 25 09:38:19 2008 +0100
+++ b/dmenu.c Fri Aug 29 10:09:40 2008 +0100
@@ -79,7 +79,7 @@
 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;
@@ -300,9 +300,6 @@
                 }
         }
         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);
Received on Fri Aug 29 2008 - 09:11:36 UTC

This archive was generated by hypermail 2.2.0 : Fri Aug 29 2008 - 09:12:04 UTC