diff options
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; | |||
| 233 | static Client *stack = NULL; | 233 | static Client *stack = NULL; |
| 234 | static Cursor cursor[CurLast]; | 234 | static Cursor cursor[CurLast]; |
| 235 | static Display *dpy; | 235 | static Display *dpy; |
| 236 | static DC dc = {0}; | 236 | static DC dc; |
| 237 | static Layout *lt[] = { NULL, NULL }; | 237 | static Layout *lt[] = { NULL, NULL }; |
| 238 | static Window root, barwin; | 238 | static Window root, barwin; |
| 239 | /* configuration, allows nested code to access above variables */ | 239 | /* configuration, allows nested code to access above variables */ |
| @@ -250,7 +250,8 @@ applyrules(Client *c) { | |||
| 250 | XClassHint ch = { 0 }; | 250 | XClassHint ch = { 0 }; |
| 251 | 251 | ||
| 252 | /* rule matching */ | 252 | /* rule matching */ |
| 253 | XGetClassHint(dpy, c->win, &ch); | 253 | if(XGetClassHint(dpy, c->win, &ch) == 0) |
| 254 | return; | ||
| 254 | for(i = 0; i < LENGTH(rules); i++) { | 255 | for(i = 0; i < LENGTH(rules); i++) { |
| 255 | r = &rules[i]; | 256 | r = &rules[i]; |
| 256 | if((!r->title || strstr(c->name, r->title)) | 257 | if((!r->title || strstr(c->name, r->title)) |
| @@ -796,9 +797,6 @@ initfont(const char *fontstr) { | |||
| 796 | } | 797 | } |
| 797 | } | 798 | } |
| 798 | else { | 799 | else { |
| 799 | if(dc.font.xfont) | ||
| 800 | XFreeFont(dpy, dc.font.xfont); | ||
| 801 | dc.font.xfont = NULL; | ||
| 802 | if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)) | 800 | if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)) |
| 803 | && !(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) | 801 | && !(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) |
| 804 | die("error, cannot load font: '%s'\n", fontstr); | 802 | die("error, cannot load font: '%s'\n", fontstr); |
