diff options
| author | arg@10ksloc.org <unknown> | 2006-07-20 12:18:06 +0200 |
|---|---|---|
| committer | arg@10ksloc.org <unknown> | 2006-07-20 12:18:06 +0200 |
| commit | dc5d967ee61046f899b3b49daeb9268c8161844a (patch) | |
| tree | 012a500412dc2c3a427a658d0f257c39de8351fb /draw.c | |
| parent | Added tag 0.4 for changeset eb3165734f00fe7f7da8aeebaed00e60a57caac9 (diff) | |
| download | dwm-dc5d967ee61046f899b3b49daeb9268c8161844a.tar.gz dwm-dc5d967ee61046f899b3b49daeb9268c8161844a.zip | |
cleaned up code
Diffstat (limited to 'draw.c')
| -rw-r--r-- | draw.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -14,6 +14,7 @@ static void | |||
| 14 | drawborder(void) | 14 | drawborder(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 | |||
| 33 | textnw(char *text, unsigned int len) | 34 | textnw(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 | |||
| 44 | drawtext(const char *text, Bool invert, Bool border) | 46 | drawtext(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) | |||
| 170 | unsigned long | 172 | unsigned long |
| 171 | getcolor(const char *colstr) | 173 | getcolor(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; |
