summaryrefslogtreecommitdiffstats
path: root/screen-redraw.c
diff options
context:
space:
mode:
authornicm <nicm>2015-04-19 21:05:27 +0000
committernicm <nicm>2015-04-19 21:05:27 +0000
commitee123c248951450100475717f5bd45f292d9bb4d (patch)
tree84a865000a9d0ba60d891114c88f6d36c283b5c3 /screen-redraw.c
parent4a7587931ce54aa1a94a104480113d658c295b6b (diff)
Support setting the default window and pane background colours (window
and active pane via window-style and window-active-style options, an individual pane by a new select-pane -P flag). From J Raynor.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r--screen-redraw.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/screen-redraw.c b/screen-redraw.c
index c2b2ece6..e3369b82 100644
--- a/screen-redraw.c
+++ b/screen-redraw.c
@@ -266,7 +266,7 @@ screen_redraw_pane(struct client *c, struct window_pane *wp)
yoff++;
for (i = 0; i < wp->sy; i++)
- tty_draw_line(&c->tty, wp->screen, i, wp->xoff, yoff);
+ tty_draw_pane(&c->tty, wp, i, wp->xoff, yoff);
tty_reset(&c->tty);
}
@@ -323,9 +323,9 @@ screen_redraw_draw_borders(struct client *c, int status, u_int top)
small && i > msgx && j == msgy)
continue;
if (screen_redraw_check_active(i, j, type, w, wp))
- tty_attributes(tty, &active_gc);
+ tty_attributes(tty, &active_gc, NULL);
else
- tty_attributes(tty, &other_gc);
+ tty_attributes(tty, &other_gc, NULL);
tty_cursor(tty, i, top + j);
tty_putc(tty, CELL_BORDERS[type]);
}
@@ -333,7 +333,7 @@ screen_redraw_draw_borders(struct client *c, int status, u_int top)
if (small) {
memcpy(&msg_gc, &grid_default_cell, sizeof msg_gc);
- tty_attributes(tty, &msg_gc);
+ tty_attributes(tty, &msg_gc, NULL);
tty_cursor(tty, msgx, msgy);
tty_puts(tty, msg);
}
@@ -346,15 +346,13 @@ screen_redraw_draw_panes(struct client *c, u_int top)
struct window *w = c->session->curw->window;
struct tty *tty = &c->tty;
struct window_pane *wp;
- struct screen *s;
u_int i;
TAILQ_FOREACH(wp, &w->panes, entry) {
if (!window_pane_visible(wp))
continue;
- s = wp->screen;
for (i = 0; i < wp->sy; i++)
- tty_draw_line(tty, s, i, wp->xoff, top + wp->yoff);
+ tty_draw_pane(tty, wp, i, wp->xoff, top + wp->yoff);
if (c->flags & CLIENT_IDENTIFY)
screen_redraw_draw_number(c, wp);
}
@@ -367,9 +365,9 @@ screen_redraw_draw_status(struct client *c, u_int top)
struct tty *tty = &c->tty;
if (top)
- tty_draw_line(tty, &c->status, 0, 0, 0);
+ tty_draw_line(tty, NULL, &c->status, 0, 0, 0);
else
- tty_draw_line(tty, &c->status, 0, 0, tty->sy - 1);
+ tty_draw_line(tty, NULL, &c->status, 0, 0, tty->sy - 1);
}
/* Draw number on a pane. */
@@ -411,7 +409,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp)
colour_set_bg(&gc, active_colour);
else
colour_set_bg(&gc, colour);
- tty_attributes(tty, &gc);
+ tty_attributes(tty, &gc, wp);
for (ptr = buf; *ptr != '\0'; ptr++) {
if (*ptr < '0' || *ptr > '9')
continue;
@@ -438,7 +436,7 @@ draw_text:
colour_set_fg(&gc, active_colour);
else
colour_set_fg(&gc, colour);
- tty_attributes(tty, &gc);
+ tty_attributes(tty, &gc, wp);
tty_puts(tty, buf);
tty_cursor(tty, 0, 0);