diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-09-12 10:57:28 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-09-12 10:57:28 +0200 |
| commit | ca65478c8968434c78aacf4a102ccbbe4a66ad9e (patch) | |
| tree | a7b8e02be5fb457e1c3f0e646e212911048390b6 /draw.c | |
| parent | some more simplifications of intro comment in dwm.h, this should suffice for ... (diff) | |
| download | dwm-ca65478c8968434c78aacf4a102ccbbe4a66ad9e.tar.gz dwm-ca65478c8968434c78aacf4a102ccbbe4a66ad9e.zip | |
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Diffstat (limited to '')
| -rw-r--r-- | draw.c | 24 |
1 files changed, 8 insertions, 16 deletions
| @@ -10,8 +10,7 @@ | |||
| 10 | /* static */ | 10 | /* static */ |
| 11 | 11 | ||
| 12 | static unsigned int | 12 | static unsigned int |
| 13 | textnw(const char *text, unsigned int len) | 13 | textnw(const char *text, unsigned int len) { |
| 14 | { | ||
| 15 | XRectangle r; | 14 | XRectangle r; |
| 16 | 15 | ||
| 17 | if(dc.font.set) { | 16 | if(dc.font.set) { |
| @@ -22,8 +21,7 @@ textnw(const char *text, unsigned int len) | |||
| 22 | } | 21 | } |
| 23 | 22 | ||
| 24 | static void | 23 | static void |
| 25 | drawtext(const char *text, unsigned long col[ColLast], Bool highlight) | 24 | drawtext(const char *text, unsigned long col[ColLast], Bool highlight) { |
| 26 | { | ||
| 27 | int x, y, w, h; | 25 | int x, y, w, h; |
| 28 | static char buf[256]; | 26 | static char buf[256]; |
| 29 | unsigned int len, olen; | 27 | unsigned int len, olen; |
| @@ -82,8 +80,7 @@ drawtext(const char *text, unsigned long col[ColLast], Bool highlight) | |||
| 82 | /* extern */ | 80 | /* extern */ |
| 83 | 81 | ||
| 84 | void | 82 | void |
| 85 | drawall() | 83 | drawall() { |
| 86 | { | ||
| 87 | Client *c; | 84 | Client *c; |
| 88 | 85 | ||
| 89 | for(c = clients; c; c = getnext(c->next)) | 86 | for(c = clients; c; c = getnext(c->next)) |
| @@ -92,8 +89,7 @@ drawall() | |||
| 92 | } | 89 | } |
| 93 | 90 | ||
| 94 | void | 91 | void |
| 95 | drawstatus() | 92 | drawstatus() { |
| 96 | { | ||
| 97 | int i, x; | 93 | int i, x; |
| 98 | 94 | ||
| 99 | dc.x = dc.y = 0; | 95 | dc.x = dc.y = 0; |
| @@ -131,8 +127,7 @@ drawstatus() | |||
| 131 | } | 127 | } |
| 132 | 128 | ||
| 133 | void | 129 | void |
| 134 | drawtitle(Client *c) | 130 | drawtitle(Client *c) { |
| 135 | { | ||
| 136 | if(c == sel && issel) { | 131 | if(c == sel && issel) { |
| 137 | drawstatus(); | 132 | drawstatus(); |
| 138 | XUnmapWindow(dpy, c->twin); | 133 | XUnmapWindow(dpy, c->twin); |
| @@ -150,8 +145,7 @@ drawtitle(Client *c) | |||
| 150 | } | 145 | } |
| 151 | 146 | ||
| 152 | unsigned long | 147 | unsigned long |
| 153 | getcolor(const char *colstr) | 148 | getcolor(const char *colstr) { |
| 154 | { | ||
| 155 | Colormap cmap = DefaultColormap(dpy, screen); | 149 | Colormap cmap = DefaultColormap(dpy, screen); |
| 156 | XColor color; | 150 | XColor color; |
| 157 | 151 | ||
| @@ -160,8 +154,7 @@ getcolor(const char *colstr) | |||
| 160 | } | 154 | } |
| 161 | 155 | ||
| 162 | void | 156 | void |
| 163 | setfont(const char *fontstr) | 157 | setfont(const char *fontstr) { |
| 164 | { | ||
| 165 | char **missing, *def; | 158 | char **missing, *def; |
| 166 | int i, n; | 159 | int i, n; |
| 167 | 160 | ||
| @@ -211,7 +204,6 @@ setfont(const char *fontstr) | |||
| 211 | } | 204 | } |
| 212 | 205 | ||
| 213 | unsigned int | 206 | unsigned int |
| 214 | textw(const char *text) | 207 | textw(const char *text) { |
| 215 | { | ||
| 216 | return textnw(text, strlen(text)) + dc.font.height; | 208 | return textnw(text, strlen(text)) + dc.font.height; |
| 217 | } | 209 | } |
