Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
removed the stack position stuff
[dwm.git]
/
draw.c
diff --git
a/draw.c
b/draw.c
index
65a3d51
..
c5cd35b
100644
(file)
--- a/
draw.c
+++ b/
draw.c
@@
-72,7
+72,7
@@
drawtext(const char *text, unsigned long col[ColLast], Bool highlight) {
if(highlight) {
r.x = dc.x + 2;
r.y = dc.y + 2;
if(highlight) {
r.x = dc.x + 2;
r.y = dc.y + 2;
- r.width = r.height =
3
;
+ r.width = r.height =
(h + 2) / 4
;
XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
}
}
XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
}
}
@@
-80,7
+80,7
@@
drawtext(const char *text, unsigned long col[ColLast], Bool highlight) {
/* extern */
void
/* extern */
void
-drawall() {
+drawall(
void
) {
Client *c;
for(c = clients; c; c = getnext(c->next))
Client *c;
for(c = clients; c; c = getnext(c->next))
@@
-89,7
+89,7
@@
drawall() {
}
void
}
void
-drawstatus() {
+drawstatus(
void
) {
int i, x;
dc.x = dc.y = 0;
int i, x;
dc.x = dc.y = 0;
@@
-104,7
+104,7
@@
drawstatus() {
}
dc.w = bmw;
}
dc.w = bmw;
- drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.status, False);
+ drawtext(arrange == dofloat ?
FLOATSYMBOL : TILESYMBOL, dc.status, False);
x = dc.x + dc.w;
dc.w = textw(stext);
x = dc.x + dc.w;
dc.w = textw(stext);
@@
-149,7
+149,8
@@
getcolor(const char *colstr) {
Colormap cmap = DefaultColormap(dpy, screen);
XColor color;
Colormap cmap = DefaultColormap(dpy, screen);
XColor color;
- XAllocNamedColor(dpy, cmap, colstr, &color, &color);
+ if(!XAllocNamedColor(dpy, cmap, colstr, &color, &color))
+ eprint("error, cannot allocate color '%s'\n", colstr);
return color.pixel;
}
return color.pixel;
}