Mercurial > hg > index.fcgi > dwm > dwm-3.6.1-11pba
diff draw.c @ 9:bc03b37b37ba
move command mode text to the left, next to the layout icon
author | paulo@thepaulopc |
---|---|
date | Wed, 15 Jun 2011 23:27:32 -0700 |
parents | 0968b3739b8d |
children |
line diff
1.1 --- a/draw.c Tue Jun 14 00:33:07 2011 -0700 1.2 +++ b/draw.c Wed Jun 15 23:27:32 2011 -0700 1.3 @@ -72,19 +72,21 @@ 1.4 drawtext(lt->symbol, dc.norm); 1.5 x = dc.x + dc.w; 1.6 1.7 - char *_stext = stext; 1.8 if (getkeymode() == COMMANDMODE) { 1.9 - strcpy(cmtext, "-- CMD -- "); 1.10 - strncat(cmtext, stext, sizeof cmtext - 1 - strlen(cmtext)); 1.11 - _stext = cmtext; 1.12 + const char *_cmtext = "-- CMD --"; 1.13 + dc.w = textw(_cmtext); 1.14 + dc.x = x; 1.15 + drawtext(_cmtext, dc.norm); 1.16 + x = dc.x + dc.w; 1.17 } 1.18 - dc.w = textw(_stext); 1.19 + 1.20 + dc.w = textw(stext); 1.21 dc.x = sw - dc.w; 1.22 if(dc.x < x) { 1.23 dc.x = x; 1.24 dc.w = sw - x; 1.25 } 1.26 - drawtext(_stext, dc.norm); 1.27 + drawtext(stext, dc.norm); 1.28 1.29 if((dc.w = dc.x - x) > bh) { 1.30 dc.x = x;