diff options
author | arg@mmvi <unknown> | 2006-09-26 13:39:00 +0200 |
---|---|---|
committer | arg@mmvi <unknown> | 2006-09-26 13:39:00 +0200 |
commit | 14133be5bd4d819579d62ad99c2b6de20040ff13 (patch) | |
tree | 8ea7c056d2477522fec784d43374b85763eb1b06 | |
parent | 3b590beda2fb23400f74394badd7a5231d4d7920 (diff) |
reverting
-rw-r--r-- | dmenu.h | 3 | ||||
-rw-r--r-- | draw.c | 5 | ||||
-rw-r--r-- | main.c | 8 |
3 files changed, 7 insertions, 9 deletions
@@ -43,8 +43,7 @@ extern DC dc; /* global drawing context */ | |||
43 | /* draw.c */ | 43 | /* draw.c */ |
44 | extern void drawtext(const char *text, | 44 | extern void drawtext(const char *text, |
45 | unsigned long col[ColLast]); /* draws text with the defined color tuple */ | 45 | unsigned long col[ColLast]); /* draws text with the defined color tuple */ |
46 | extern unsigned long getcolor( | 46 | extern unsigned long getcolor(const char *colstr); /* returns color of colstr */ |
47 | const char *colstr, const char *alternate); /* returns color of colstr */ | ||
48 | extern void setfont(const char *fontstr); /* sets global font */ | 47 | extern void setfont(const char *fontstr); /* sets global font */ |
49 | extern unsigned int textw(const char *text); /* returns width of text in px */ | 48 | extern unsigned int textw(const char *text); /* returns width of text in px */ |
50 | 49 | ||
@@ -76,12 +76,11 @@ drawtext(const char *text, unsigned long col[ColLast]) { | |||
76 | } | 76 | } |
77 | 77 | ||
78 | unsigned long | 78 | unsigned long |
79 | getcolor(const char *colstr, const char *alternate) { | 79 | getcolor(const char *colstr) { |
80 | Colormap cmap = DefaultColormap(dpy, screen); | 80 | Colormap cmap = DefaultColormap(dpy, screen); |
81 | XColor color; | 81 | XColor color; |
82 | 82 | ||
83 | if(XAllocNamedColor(dpy, cmap, colstr, &color, &color) != Success) | 83 | XAllocNamedColor(dpy, cmap, colstr, &color, &color); |
84 | XAllocNamedColor(dpy, cmap, alternate, &color, &color); | ||
85 | return color.pixel; | 84 | return color.pixel; |
86 | } | 85 | } |
87 | 86 | ||
@@ -341,10 +341,10 @@ main(int argc, char *argv[]) { | |||
341 | maxname = readstdin(); | 341 | maxname = readstdin(); |
342 | 342 | ||
343 | /* style */ | 343 | /* style */ |
344 | dc.norm[ColBG] = getcolor(normbg, NORMBGCOLOR); | 344 | dc.norm[ColBG] = getcolor(normbg); |
345 | dc.norm[ColFG] = getcolor(normfg, NORMFGCOLOR); | 345 | dc.norm[ColFG] = getcolor(normfg); |
346 | dc.sel[ColBG] = getcolor(selbg, SELBGCOLOR); | 346 | dc.sel[ColBG] = getcolor(selbg); |
347 | dc.sel[ColFG] = getcolor(selfg, SELFGCOLOR); | 347 | dc.sel[ColFG] = getcolor(selfg); |
348 | setfont(font); | 348 | setfont(font); |
349 | 349 | ||
350 | wa.override_redirect = 1; | 350 | wa.override_redirect = 1; |