Mercurial > hg > index.fcgi > dwm > dwm-3.6.1-12pba
comparison draw.c @ 6:0968b3739b8d
apply keymodes patch
author | paulo@thepaulopc |
---|---|
date | Sun, 12 Jun 2011 14:32:54 -0700 |
parents | faa4cb9d7bd6 |
children | bc03b37b37ba |
comparison
equal
deleted
inserted
replaced
1:97968aa783cf | 2:c60b8f9d8d59 |
---|---|
69 dc.x += dc.w; | 69 dc.x += dc.w; |
70 } | 70 } |
71 dc.w = blw; | 71 dc.w = blw; |
72 drawtext(lt->symbol, dc.norm); | 72 drawtext(lt->symbol, dc.norm); |
73 x = dc.x + dc.w; | 73 x = dc.x + dc.w; |
74 dc.w = textw(stext); | 74 |
75 char *_stext = stext; | |
76 if (getkeymode() == COMMANDMODE) { | |
77 strcpy(cmtext, "-- CMD -- "); | |
78 strncat(cmtext, stext, sizeof cmtext - 1 - strlen(cmtext)); | |
79 _stext = cmtext; | |
80 } | |
81 dc.w = textw(_stext); | |
75 dc.x = sw - dc.w; | 82 dc.x = sw - dc.w; |
76 if(dc.x < x) { | 83 if(dc.x < x) { |
77 dc.x = x; | 84 dc.x = x; |
78 dc.w = sw - x; | 85 dc.w = sw - x; |
79 } | 86 } |
80 drawtext(stext, dc.norm); | 87 drawtext(_stext, dc.norm); |
88 | |
81 if((dc.w = dc.x - x) > bh) { | 89 if((dc.w = dc.x - x) > bh) { |
82 dc.x = x; | 90 dc.x = x; |
83 drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm); | 91 drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm); |
84 } | 92 } |
85 XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, sw, bh, 0, 0); | 93 XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, sw, bh, 0, 0); |