diff options
| author | Quentin Carbonneaux | 2014-08-26 20:25:57 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-08-26 20:51:32 -0400 |
| commit | 0ed310e2e83cf9dc6779304c33a7eac7b467c938 (patch) | |
| tree | 2351872940dcb2313cc4939494c3afbe84ab50da | |
| parent | c47ba5be4ee69616b19adf0a2766f6a7466ee340 (diff) | |
hoist assignments out of a loop
| -rw-r--r-- | win.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -235,12 +235,13 @@ win_redraw_frame() W *w; int i; + b = (GRect){ 0, 0, g->border, fheight }; for (i=0; (w = screen[i]); i++) { assert(!screen[i+1] || w->gr.x + w->gr.w + g->border == screen[i+1]->gr.x); if (dirty(w)) { if (screen[i+1]) { - b = (GRect){ w->gr.x + w->gr.w, 0, g->border, fheight }; - g->drawrect(&b, 0, 0, g->border, b.h, GGray); + b.x = w->gr.x + w->gr.w; + g->drawrect(&b, 0, 0, b.w, b.h, GGray); } draw(w, GPaleYellow); if (tag.owner == w) |
