diff options
author | Anselm R Garbe <garbeam@gmail.com> | 2008-08-29 10:13:47 +0100 |
---|---|---|
committer | Anselm R Garbe <garbeam@gmail.com> | 2008-08-29 10:13:47 +0100 |
commit | 26f41c905529c6df908980c731077fa340a9e1c8 (patch) | |
tree | 94c32b48d6274248efd470b295e188f5fb19a102 /dwm.c | |
parent | 73ec124ae94a699e74212cc1a2e21b30f9d4ad7c (diff) | |
download | dwm-26f41c905529c6df908980c731077fa340a9e1c8.tar.gz dwm-26f41c905529c6df908980c731077fa340a9e1c8.tar.bz2 dwm-26f41c905529c6df908980c731077fa340a9e1c8.zip |
checking result of XGetClassHint, removed some obsolete lines in initfont()
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -233,7 +233,7 @@ static Client *sel = NULL; static Client *stack = NULL; static Cursor cursor[CurLast]; static Display *dpy; -static DC dc = {0}; +static DC dc; static Layout *lt[] = { NULL, NULL }; static Window root, barwin; /* configuration, allows nested code to access above variables */ @@ -250,7 +250,8 @@ applyrules(Client *c) { XClassHint ch = { 0 }; /* rule matching */ - XGetClassHint(dpy, c->win, &ch); + if(XGetClassHint(dpy, c->win, &ch) == 0) + return; for(i = 0; i < LENGTH(rules); i++) { r = &rules[i]; if((!r->title || strstr(c->name, r->title)) @@ -796,9 +797,6 @@ initfont(const char *fontstr) { } } 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"))) die("error, cannot load font: '%s'\n", fontstr); |