X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=draw.c;h=506a86290f2798ef8d5f38a0a61149d1a48f45a6;hb=8cc7f3bace087dfb024a23115c211d82b35614ae;hp=0c920e5d1c063d3b63b0874d309e8cd2c1416b50;hpb=4688ad181da14be36e034918580ec0ce5968ffdb;p=dwm.git diff --git a/draw.c b/draw.c index 0c920e5..506a862 100644 --- a/draw.c +++ b/draw.c @@ -3,7 +3,6 @@ * See LICENSE file for license details. */ #include "dwm.h" - #include #include #include @@ -31,7 +30,7 @@ drawborder(void) } static unsigned int -textnw(char *text, unsigned int len) +textnw(const char *text, unsigned int len) { XRectangle r; @@ -99,7 +98,7 @@ drawall() { Client *c; - for(c = clients; c; c = getnext(c->next, tsel)) + for(c = clients; c; c = getnext(c->next)) drawtitle(c); drawstatus(); } @@ -157,8 +156,8 @@ drawtitle(Client *c) for(i = 0; i < TLast; i++) { if(c->tags[i]) { dc.x += dc.w; - dc.w = textw(c->tags[i]); - drawtext(c->tags[i], !istile, True); + dc.w = textw(tags[i]); + drawtext(tags[i], !istile, True); } } dc.x += dc.w; @@ -230,7 +229,7 @@ setfont(const char *fontstr) } unsigned int -textw(char *text) +textw(const char *text) { return textnw(text, strlen(text)) + dc.font.height; }