version 1.175, 2015/04/15 22:34:46 |
version 1.176, 2015/04/19 21:05:27 |
|
|
void tty_colours_bg(struct tty *, const struct grid_cell *); |
void tty_colours_bg(struct tty *, const struct grid_cell *); |
|
|
int tty_large_region(struct tty *, const struct tty_ctx *); |
int tty_large_region(struct tty *, const struct tty_ctx *); |
|
int tty_fake_bce(const struct tty *, const struct window_pane *); |
void tty_redraw_region(struct tty *, const struct tty_ctx *); |
void tty_redraw_region(struct tty *, const struct tty_ctx *); |
void tty_emulate_repeat( |
void tty_emulate_repeat( |
struct tty *, enum tty_code_code, enum tty_code_code, u_int); |
struct tty *, enum tty_code_code, enum tty_code_code, u_int); |
void tty_repeat_space(struct tty *, u_int); |
void tty_repeat_space(struct tty *, u_int); |
void tty_cell(struct tty *, const struct grid_cell *); |
void tty_cell(struct tty *, const struct grid_cell *, |
|
const struct window_pane *); |
|
void tty_default_colours(struct grid_cell *, const struct window_pane *); |
|
|
#define tty_use_acs(tty) \ |
#define tty_use_acs(tty) \ |
(tty_term_has((tty)->term, TTYC_ACSC) && !((tty)->flags & TTY_UTF8)) |
(tty_term_has((tty)->term, TTYC_ACSC) && !((tty)->flags & TTY_UTF8)) |
|
|
} |
} |
|
|
/* |
/* |
|
* Return if BCE is needed but the terminal doesn't have it - it'll need to be |
|
* emulated. |
|
*/ |
|
int |
|
tty_fake_bce(const struct tty *tty, const struct window_pane *wp) |
|
{ |
|
struct grid_cell gc; |
|
|
|
memcpy(&gc, &grid_default_cell, sizeof gc); |
|
tty_default_colours(&gc, wp); |
|
|
|
if (gc.bg == 8 && !(gc.flags & GRID_FLAG_BG256)) |
|
return (0); |
|
return (!tty_term_flag(tty->term, TTYC_BCE)); |
|
} |
|
|
|
/* |
* Redraw scroll region using data from screen (already updated). Used when |
* Redraw scroll region using data from screen (already updated). Used when |
* CSR not supported, or window is a pane that doesn't take up the full |
* CSR not supported, or window is a pane that doesn't take up the full |
* width of the terminal. |
* width of the terminal. |
|
|
|
|
if (ctx->ocy < ctx->orupper || ctx->ocy > ctx->orlower) { |
if (ctx->ocy < ctx->orupper || ctx->ocy > ctx->orlower) { |
for (i = ctx->ocy; i < screen_size_y(s); i++) |
for (i = ctx->ocy; i < screen_size_y(s); i++) |
tty_draw_line(tty, s, i, ctx->xoff, ctx->yoff); |
tty_draw_pane(tty, wp, i, ctx->xoff, ctx->yoff); |
} else { |
} else { |
for (i = ctx->orupper; i <= ctx->orlower; i++) |
for (i = ctx->orupper; i <= ctx->orlower; i++) |
tty_draw_line(tty, s, i, ctx->xoff, ctx->yoff); |
tty_draw_pane(tty, wp, i, ctx->xoff, ctx->yoff); |
} |
} |
} |
} |
|
|
void |
void |
tty_draw_line(struct tty *tty, struct screen *s, u_int py, u_int ox, u_int oy) |
tty_draw_pane(struct tty *tty, const struct window_pane *wp, u_int py, u_int ox, |
|
u_int oy) |
{ |
{ |
|
tty_draw_line(tty, wp, wp->screen, py, ox, oy); |
|
} |
|
|
|
void |
|
tty_draw_line(struct tty *tty, const struct window_pane *wp, |
|
struct screen *s, u_int py, u_int ox, u_int oy) |
|
{ |
const struct grid_cell *gc; |
const struct grid_cell *gc; |
struct grid_line *gl; |
struct grid_line *gl; |
struct grid_cell tmpgc; |
struct grid_cell tmpgc; |
|
|
~(GRID_FLAG_FG256|GRID_FLAG_BG256); |
~(GRID_FLAG_FG256|GRID_FLAG_BG256); |
tmpgc.flags |= s->sel.cell.flags & |
tmpgc.flags |= s->sel.cell.flags & |
(GRID_FLAG_FG256|GRID_FLAG_BG256); |
(GRID_FLAG_FG256|GRID_FLAG_BG256); |
tty_cell(tty, &tmpgc); |
tty_cell(tty, &tmpgc, wp); |
} else |
} else |
tty_cell(tty, gc); |
tty_cell(tty, gc, wp); |
} |
} |
|
|
if (sx >= tty->sx) { |
if (sx >= tty->sx) { |
tty_update_mode(tty, tty->mode, s); |
tty_update_mode(tty, tty->mode, s); |
return; |
return; |
} |
} |
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_cursor(tty, ox + sx, oy + py); |
tty_cursor(tty, ox + sx, oy + py); |
if (sx != screen_size_x(s) && ox + screen_size_x(s) >= tty->sx && |
if (sx != screen_size_x(s) && ox + screen_size_x(s) >= tty->sx && |
tty_term_has(tty->term, TTYC_EL)) |
tty_term_has(tty->term, TTYC_EL) && !tty_fake_bce(tty, wp)) |
tty_putcode(tty, TTYC_EL); |
tty_putcode(tty, TTYC_EL); |
else |
else |
tty_repeat_space(tty, screen_size_x(s) - sx); |
tty_repeat_space(tty, screen_size_x(s) - sx); |
|
|
struct window_pane *wp = ctx->wp; |
struct window_pane *wp = ctx->wp; |
|
|
if (!tty_pane_full_width(tty, ctx)) { |
if (!tty_pane_full_width(tty, ctx)) { |
tty_draw_line(tty, wp->screen, ctx->ocy, ctx->xoff, ctx->yoff); |
tty_draw_pane(tty, wp, ctx->ocy, ctx->xoff, ctx->yoff); |
return; |
return; |
} |
} |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
if (tty_term_has(tty->term, TTYC_ICH) || |
if (!tty_fake_bce(tty, wp) && (tty_term_has(tty->term, TTYC_ICH) || |
tty_term_has(tty->term, TTYC_ICH1)) |
tty_term_has(tty->term, TTYC_ICH1))) |
tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num); |
tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num); |
else |
else |
tty_draw_line(tty, wp->screen, ctx->ocy, ctx->xoff, ctx->yoff); |
tty_draw_pane(tty, wp, ctx->ocy, ctx->xoff, ctx->yoff); |
} |
} |
|
|
void |
void |
|
|
{ |
{ |
struct window_pane *wp = ctx->wp; |
struct window_pane *wp = ctx->wp; |
|
|
if (!tty_pane_full_width(tty, ctx) || |
if (!tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, wp) || |
(!tty_term_has(tty->term, TTYC_DCH) && |
(!tty_term_has(tty->term, TTYC_DCH) && |
!tty_term_has(tty->term, TTYC_DCH1))) { |
!tty_term_has(tty->term, TTYC_DCH1))) { |
tty_draw_line(tty, wp->screen, ctx->ocy, ctx->xoff, ctx->yoff); |
tty_draw_pane(tty, wp, ctx->ocy, ctx->xoff, ctx->yoff); |
return; |
return; |
} |
} |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
|
|
{ |
{ |
u_int i; |
u_int i; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, ctx->wp); |
|
|
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
if (tty_term_has(tty->term, TTYC_ECH)) |
if (tty_term_has(tty->term, TTYC_ECH) && !tty_fake_bce(tty, ctx->wp)) |
tty_putcode1(tty, TTYC_ECH, ctx->num); |
tty_putcode1(tty, TTYC_ECH, ctx->num); |
else { |
else { |
for (i = 0; i < ctx->num; i++) |
for (i = 0; i < ctx->num; i++) |
|
|
void |
void |
tty_cmd_insertline(struct tty *tty, const struct tty_ctx *ctx) |
tty_cmd_insertline(struct tty *tty, const struct tty_ctx *ctx) |
{ |
{ |
if (!tty_pane_full_width(tty, ctx) || |
if (!tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, ctx->wp) || |
!tty_term_has(tty->term, TTYC_CSR) || |
!tty_term_has(tty->term, TTYC_CSR) || |
!tty_term_has(tty->term, TTYC_IL1)) { |
!tty_term_has(tty->term, TTYC_IL1)) { |
tty_redraw_region(tty, ctx); |
tty_redraw_region(tty, ctx); |
return; |
return; |
} |
} |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, ctx->wp); |
|
|
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); |
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
void |
void |
tty_cmd_deleteline(struct tty *tty, const struct tty_ctx *ctx) |
tty_cmd_deleteline(struct tty *tty, const struct tty_ctx *ctx) |
{ |
{ |
if (!tty_pane_full_width(tty, ctx) || |
if (!tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, ctx->wp) || |
!tty_term_has(tty->term, TTYC_CSR) || |
!tty_term_has(tty->term, TTYC_CSR) || |
!tty_term_has(tty->term, TTYC_DL1)) { |
!tty_term_has(tty->term, TTYC_DL1)) { |
tty_redraw_region(tty, ctx); |
tty_redraw_region(tty, ctx); |
return; |
return; |
} |
} |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, ctx->wp); |
|
|
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); |
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
struct window_pane *wp = ctx->wp; |
struct window_pane *wp = ctx->wp; |
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_cursor_pane(tty, ctx, 0, ctx->ocy); |
tty_cursor_pane(tty, ctx, 0, ctx->ocy); |
|
|
if (tty_pane_full_width(tty, ctx) && tty_term_has(tty->term, TTYC_EL)) |
if (tty_pane_full_width(tty, ctx) && !tty_fake_bce(tty, wp) && |
|
tty_term_has(tty->term, TTYC_EL)) |
tty_putcode(tty, TTYC_EL); |
tty_putcode(tty, TTYC_EL); |
else |
else |
tty_repeat_space(tty, screen_size_x(s)); |
tty_repeat_space(tty, screen_size_x(s)); |
|
|
struct window_pane *wp = ctx->wp; |
struct window_pane *wp = ctx->wp; |
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
if (tty_pane_full_width(tty, ctx) && tty_term_has(tty->term, TTYC_EL)) |
if (tty_pane_full_width(tty, ctx) && |
|
tty_term_has(tty->term, TTYC_EL) && !tty_fake_bce(tty, wp)) |
tty_putcode(tty, TTYC_EL); |
tty_putcode(tty, TTYC_EL); |
else |
else |
tty_repeat_space(tty, screen_size_x(s) - ctx->ocx); |
tty_repeat_space(tty, screen_size_x(s) - ctx->ocx); |
|
|
void |
void |
tty_cmd_clearstartofline(struct tty *tty, const struct tty_ctx *ctx) |
tty_cmd_clearstartofline(struct tty *tty, const struct tty_ctx *ctx) |
{ |
{ |
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, ctx->wp); |
|
|
if (ctx->xoff == 0 && tty_term_has(tty->term, TTYC_EL1)) { |
if (ctx->xoff == 0 && tty_term_has(tty->term, TTYC_EL1) && |
|
!tty_fake_bce(tty, ctx->wp)) { |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_putcode(tty, TTYC_EL1); |
tty_putcode(tty, TTYC_EL1); |
} else { |
} else { |
|
|
if (ctx->ocy != ctx->orupper) |
if (ctx->ocy != ctx->orupper) |
return; |
return; |
|
|
if (!tty_pane_full_width(tty, ctx) || |
if (!tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, ctx->wp) || |
!tty_term_has(tty->term, TTYC_CSR) || |
!tty_term_has(tty->term, TTYC_CSR) || |
!tty_term_has(tty->term, TTYC_RI)) { |
!tty_term_has(tty->term, TTYC_RI)) { |
tty_redraw_region(tty, ctx); |
tty_redraw_region(tty, ctx); |
return; |
return; |
} |
} |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, ctx->wp); |
|
|
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); |
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->orupper); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->orupper); |
|
|
if (ctx->ocy != ctx->orlower) |
if (ctx->ocy != ctx->orlower) |
return; |
return; |
|
|
if (!tty_pane_full_width(tty, ctx) || |
if (!tty_pane_full_width(tty, ctx) || tty_fake_bce(tty, wp) || |
!tty_term_has(tty->term, TTYC_CSR)) { |
!tty_term_has(tty->term, TTYC_CSR)) { |
if (tty_large_region(tty, ctx)) |
if (tty_large_region(tty, ctx)) |
wp->flags |= PANE_REDRAW; |
wp->flags |= PANE_REDRAW; |
|
|
if (ctx->num && !(tty->term->flags & TERM_EARLYWRAP)) |
if (ctx->num && !(tty->term->flags & TERM_EARLYWRAP)) |
return; |
return; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); |
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
u_int i, j; |
u_int i, j; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1); |
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
if (tty_pane_full_width(tty, ctx) && tty_term_has(tty->term, TTYC_EL)) { |
if (tty_pane_full_width(tty, ctx) && |
|
tty_term_has(tty->term, TTYC_EL) && !tty_fake_bce(tty, wp)) { |
tty_putcode(tty, TTYC_EL); |
tty_putcode(tty, TTYC_EL); |
if (ctx->ocy != screen_size_y(s) - 1) { |
if (ctx->ocy != screen_size_y(s) - 1) { |
tty_cursor_pane(tty, ctx, 0, ctx->ocy + 1); |
tty_cursor_pane(tty, ctx, 0, ctx->ocy + 1); |
|
|
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
u_int i, j; |
u_int i, j; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1); |
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1); |
tty_cursor_pane(tty, ctx, 0, 0); |
tty_cursor_pane(tty, ctx, 0, 0); |
|
|
if (tty_pane_full_width(tty, ctx) && tty_term_has(tty->term, TTYC_EL)) { |
if (tty_pane_full_width(tty, ctx) && |
|
tty_term_has(tty->term, TTYC_EL) && !tty_fake_bce(tty, wp)) { |
for (i = 0; i < ctx->ocy; i++) { |
for (i = 0; i < ctx->ocy; i++) { |
tty_putcode(tty, TTYC_EL); |
tty_putcode(tty, TTYC_EL); |
tty_emulate_repeat(tty, TTYC_CUD, TTYC_CUD1, 1); |
tty_emulate_repeat(tty, TTYC_CUD, TTYC_CUD1, 1); |
|
|
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
u_int i, j; |
u_int i, j; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1); |
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1); |
tty_cursor_pane(tty, ctx, 0, 0); |
tty_cursor_pane(tty, ctx, 0, 0); |
|
|
if (tty_pane_full_width(tty, ctx) && tty_term_has(tty->term, TTYC_EL)) { |
if (tty_pane_full_width(tty, ctx) && |
|
tty_term_has(tty->term, TTYC_EL) && !tty_fake_bce(tty, wp)) { |
for (i = 0; i < screen_size_y(s); i++) { |
for (i = 0; i < screen_size_y(s); i++) { |
tty_putcode(tty, TTYC_EL); |
tty_putcode(tty, TTYC_EL); |
if (i != screen_size_y(s) - 1) { |
if (i != screen_size_y(s) - 1) { |
|
|
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
u_int i, j; |
u_int i, j; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, wp); |
|
|
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1); |
tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1); |
|
|
|
|
*/ |
*/ |
cx = screen_size_x(s) - grid_cell_width(&ctx->last_cell); |
cx = screen_size_x(s) - grid_cell_width(&ctx->last_cell); |
tty_cursor_pane(tty, ctx, cx, ctx->ocy); |
tty_cursor_pane(tty, ctx, cx, ctx->ocy); |
tty_cell(tty, &ctx->last_cell); |
tty_cell(tty, &ctx->last_cell, wp); |
} |
} |
} else |
} else |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy); |
|
|
tty_cell(tty, ctx->cell); |
tty_cell(tty, ctx->cell, wp); |
} |
} |
|
|
void |
void |
|
|
* Cannot rely on not being a partial character, so just redraw the |
* Cannot rely on not being a partial character, so just redraw the |
* whole line. |
* whole line. |
*/ |
*/ |
tty_draw_line(tty, wp->screen, ctx->ocy, ctx->xoff, ctx->yoff); |
tty_draw_pane(tty, wp, ctx->ocy, ctx->xoff, ctx->yoff); |
} |
} |
|
|
void |
void |
|
|
tty->cx = tty->cy = UINT_MAX; |
tty->cx = tty->cy = UINT_MAX; |
tty->rupper = tty->rlower = UINT_MAX; |
tty->rupper = tty->rlower = UINT_MAX; |
|
|
tty_reset(tty); |
tty_attributes(tty, &grid_default_cell, ctx->wp); |
tty_cursor(tty, 0, 0); |
tty_cursor(tty, 0, 0); |
} |
} |
|
|
void |
void |
tty_cell(struct tty *tty, const struct grid_cell *gc) |
tty_cell(struct tty *tty, const struct grid_cell *gc, |
|
const struct window_pane *wp) |
{ |
{ |
struct utf8_data ud; |
struct utf8_data ud; |
u_int i; |
u_int i; |
|
|
return; |
return; |
|
|
/* Set the attributes. */ |
/* Set the attributes. */ |
tty_attributes(tty, gc); |
tty_attributes(tty, gc, wp); |
|
|
/* Get the cell and if ASCII write with putc to do ACS translation. */ |
/* Get the cell and if ASCII write with putc to do ACS translation. */ |
grid_cell_get(gc, &ud); |
grid_cell_get(gc, &ud); |
|
|
} |
} |
|
|
void |
void |
tty_attributes(struct tty *tty, const struct grid_cell *gc) |
tty_attributes(struct tty *tty, const struct grid_cell *gc, |
|
const struct window_pane *wp) |
{ |
{ |
struct grid_cell *tc = &tty->cell, gc2; |
struct grid_cell *tc = &tty->cell, gc2; |
u_char changed; |
u_char changed; |
|
|
memcpy(&gc2, gc, sizeof gc2); |
memcpy(&gc2, gc, sizeof gc2); |
|
tty_default_colours(&gc2, wp); |
|
|
/* |
/* |
* If no setab, try to use the reverse attribute as a best-effort for a |
* If no setab, try to use the reverse attribute as a best-effort for a |
|
|
} |
} |
|
|
return (-1); |
return (-1); |
|
} |
|
|
|
void |
|
tty_default_colours(struct grid_cell *gc, const struct window_pane *wp) |
|
{ |
|
const struct grid_cell *agc, *pgc, *wgc; |
|
|
|
if (wp == NULL) |
|
return; |
|
|
|
pgc = &wp->colgc; |
|
agc = options_get_style(&wp->window->options, "window-active-style"); |
|
wgc = options_get_style(&wp->window->options, "window-style"); |
|
|
|
if (gc->fg == 8 && !(gc->flags & GRID_FLAG_FG256)) { |
|
if (pgc->fg != 8 || (pgc->flags & GRID_FLAG_FG256)) { |
|
gc->fg = pgc->fg; |
|
gc->flags |= (pgc->flags & GRID_FLAG_FG256); |
|
} else if (wp == wp->window->active && |
|
(agc->fg != 8 || (agc->flags & GRID_FLAG_FG256))) { |
|
gc->fg = agc->fg; |
|
gc->flags |= (agc->flags & GRID_FLAG_FG256); |
|
} else { |
|
gc->fg = wgc->fg; |
|
gc->flags |= (wgc->flags & GRID_FLAG_FG256); |
|
} |
|
} |
|
|
|
if (gc->bg == 8 && !(gc->flags & GRID_FLAG_BG256)) { |
|
if (pgc->bg != 8 || (pgc->flags & GRID_FLAG_BG256)) { |
|
gc->bg = pgc->bg; |
|
gc->flags |= (pgc->flags & GRID_FLAG_BG256); |
|
} else if (wp == wp->window->active && |
|
(agc->bg != 8 || (agc->flags & GRID_FLAG_BG256))) { |
|
gc->bg = agc->bg; |
|
gc->flags |= (agc->flags & GRID_FLAG_BG256); |
|
} else { |
|
gc->bg = wgc->bg; |
|
gc->flags |= (wgc->flags & GRID_FLAG_BG256); |
|
} |
|
} |
} |
} |
|
|
void |
void |