aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarg@mmvi <unknown>2006-09-26 13:39:00 +0200
committerarg@mmvi <unknown>2006-09-26 13:39:00 +0200
commit14133be5bd4d819579d62ad99c2b6de20040ff13 (patch)
tree8ea7c056d2477522fec784d43374b85763eb1b06
parent3b590beda2fb23400f74394badd7a5231d4d7920 (diff)
reverting
-rw-r--r--dmenu.h3
-rw-r--r--draw.c5
-rw-r--r--main.c8
3 files changed, 7 insertions, 9 deletions
diff --git a/dmenu.h b/dmenu.h
index b58a32b..d4065d2 100644
--- a/dmenu.h
+++ b/dmenu.h
@@ -43,8 +43,7 @@ extern DC dc; /* global drawing context */
43/* draw.c */ 43/* draw.c */
44extern void drawtext(const char *text, 44extern 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 */
46extern unsigned long getcolor( 46extern unsigned long getcolor(const char *colstr); /* returns color of colstr */
47 const char *colstr, const char *alternate); /* returns color of colstr */
48extern void setfont(const char *fontstr); /* sets global font */ 47extern void setfont(const char *fontstr); /* sets global font */
49extern unsigned int textw(const char *text); /* returns width of text in px */ 48extern unsigned int textw(const char *text); /* returns width of text in px */
50 49
diff --git a/draw.c b/draw.c
index dafc107..10a011d 100644
--- a/draw.c
+++ b/draw.c
@@ -76,12 +76,11 @@ drawtext(const char *text, unsigned long col[ColLast]) {
76} 76}
77 77
78unsigned long 78unsigned long
79getcolor(const char *colstr, const char *alternate) { 79getcolor(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
diff --git a/main.c b/main.c
index 5a9b3b9..f1bba6b 100644
--- a/main.c
+++ b/main.c
@@ -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;