- /* Only draw the windows' *contents* first. */
- draw_wins (wmeta->chain_start);
-
- /* Draw windows' borders. Lines first, then line crossings / corners. */
- uint16_t n_wins = 1, i;
- struct Win * win_p = wmeta->chain_start;
- while (0 != win_p->next)
- {
- win_p = win_p->next;
- n_wins++;
- }
- struct Corners * all_corners = malloc(sizeof(struct Corners) * n_wins);
- draw_wins_borderlines(wmeta->chain_start, wmeta->active, all_corners, 0);
- for (i = 0; i < n_wins; i++)
- {
- mvwaddch(wmeta->pad.curses_win,
- all_corners[i].tl.y, all_corners[i].tl.x, '+');
- mvwaddch(wmeta->pad.curses_win,
- all_corners[i].tr.y, all_corners[i].tr.x, '+');
- mvwaddch(wmeta->pad.curses_win,
- all_corners[i].bl.y, all_corners[i].bl.x, '+');
- mvwaddch(wmeta->pad.curses_win,
- all_corners[i].br.y, all_corners[i].br.x, '+');
- }
- free(all_corners);
+ /* Draw windows' contents first, then their borders. */
+ draw_wins(wmeta->chain_start);
+ draw_wins_borderlines(wmeta->chain_start, wmeta->active);
+ draw_wins_bordercorners(wmeta->chain_start, wmeta->pad.curses_win);