reverting
14133be5
3 file(s) · +7 −9
| 43 | 43 | /* draw.c */ |
|
| 44 | 44 | extern void drawtext(const char *text, |
|
| 45 | 45 | unsigned long col[ColLast]); /* draws text with the defined color tuple */ |
|
| 46 | - | extern unsigned long getcolor( |
|
| 47 | - | const char *colstr, const char *alternate); /* returns color of colstr */ |
|
| 46 | + | extern unsigned long getcolor(const char *colstr); /* returns color of colstr */ |
|
| 48 | 47 | extern void setfont(const char *fontstr); /* sets global font */ |
|
| 49 | 48 | extern unsigned int textw(const char *text); /* returns width of text in px */ |
|
| 50 | 49 |
| 76 | 76 | } |
|
| 77 | 77 | ||
| 78 | 78 | unsigned long |
|
| 79 | - | getcolor(const char *colstr, const char *alternate) { |
|
| 79 | + | getcolor(const char *colstr) { |
|
| 80 | 80 | Colormap cmap = DefaultColormap(dpy, screen); |
|
| 81 | 81 | XColor color; |
|
| 82 | 82 | ||
| 83 | - | if(XAllocNamedColor(dpy, cmap, colstr, &color, &color) != Success) |
|
| 84 | - | XAllocNamedColor(dpy, cmap, alternate, &color, &color); |
|
| 83 | + | XAllocNamedColor(dpy, cmap, colstr, &color, &color); |
|
| 85 | 84 | return color.pixel; |
|
| 86 | 85 | } |
|
| 87 | 86 |
| 341 | 341 | maxname = readstdin(); |
|
| 342 | 342 | ||
| 343 | 343 | /* style */ |
|
| 344 | - | dc.norm[ColBG] = getcolor(normbg, NORMBGCOLOR); |
|
| 345 | - | dc.norm[ColFG] = getcolor(normfg, NORMFGCOLOR); |
|
| 346 | - | dc.sel[ColBG] = getcolor(selbg, SELBGCOLOR); |
|
| 347 | - | dc.sel[ColFG] = getcolor(selfg, SELFGCOLOR); |
|
| 344 | + | dc.norm[ColBG] = getcolor(normbg); |
|
| 345 | + | dc.norm[ColFG] = getcolor(normfg); |
|
| 346 | + | dc.sel[ColBG] = getcolor(selbg); |
|
| 347 | + | dc.sel[ColFG] = getcolor(selfg); |
|
| 348 | 348 | setfont(font); |
|
| 349 | 349 | ||
| 350 | 350 | wa.override_redirect = 1; |