summaryrefslogtreecommitdiffstats
path: root/draw.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--draw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/draw.c b/draw.c
index de4bdb0..b5d8bd2 100644
--- a/draw.c
+++ b/draw.c
@@ -14,6 +14,7 @@ static void
14drawborder(void) 14drawborder(void)
15{ 15{
16 XPoint points[5]; 16 XPoint points[5];
17
17 XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); 18 XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
18 XSetForeground(dpy, dc.gc, dc.border); 19 XSetForeground(dpy, dc.gc, dc.border);
19 points[0].x = dc.x; 20 points[0].x = dc.x;
@@ -33,6 +34,7 @@ static unsigned int
33textnw(char *text, unsigned int len) 34textnw(char *text, unsigned int len)
34{ 35{
35 XRectangle r; 36 XRectangle r;
37
36 if(dc.font.set) { 38 if(dc.font.set) {
37 XmbTextExtents(dc.font.set, text, len, NULL, &r); 39 XmbTextExtents(dc.font.set, text, len, NULL, &r);
38 return r.width; 40 return r.width;
@@ -44,8 +46,8 @@ static void
44drawtext(const char *text, Bool invert, Bool border) 46drawtext(const char *text, Bool invert, Bool border)
45{ 47{
46 int x, y, w, h; 48 int x, y, w, h;
47 unsigned int len;
48 static char buf[256]; 49 static char buf[256];
50 unsigned int len;
49 XGCValues gcv; 51 XGCValues gcv;
50 XRectangle r = { dc.x, dc.y, dc.w, dc.h }; 52 XRectangle r = { dc.x, dc.y, dc.w, dc.h };
51 53
@@ -170,8 +172,8 @@ drawtitle(Client *c)
170unsigned long 172unsigned long
171getcolor(const char *colstr) 173getcolor(const char *colstr)
172{ 174{
173 XColor color;
174 Colormap cmap = DefaultColormap(dpy, screen); 175 Colormap cmap = DefaultColormap(dpy, screen);
176 XColor color;
175 177
176 XAllocNamedColor(dpy, cmap, colstr, &color, &color); 178 XAllocNamedColor(dpy, cmap, colstr, &color, &color);
177 return color.pixel; 179 return color.pixel;