From 8110c7a25f257b13f92f34559efedba204e6ea98 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 1 May 2020 17:01:36 +0100 Subject: Do not hoke into struct window_pane from the tty code and instead set everything up in tty_ctx. Provide a way to initialize the tty_ctx from a callback and use it to let popups draw directly through input_parse in the same way as panes do, rather than forcing a full redraw on every change. --- menu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'menu.c') diff --git a/menu.c b/menu.c index e78999c6..27836694 100644 --- a/menu.c +++ b/menu.c @@ -153,13 +153,15 @@ menu_draw_cb(struct client *c, __unused struct screen_redraw_ctx *ctx0) style_apply(&gc, c->session->curw->window->options, "mode-style", NULL); - screen_write_start(&ctx, NULL, s); + screen_write_start(&ctx, s); screen_write_clearscreen(&ctx, 8); screen_write_menu(&ctx, menu, md->choice, &gc); screen_write_stop(&ctx); - for (i = 0; i < screen_size_y(&md->s); i++) - tty_draw_line(tty, NULL, s, 0, i, menu->width + 4, px, py + i); + for (i = 0; i < screen_size_y(&md->s); i++) { + tty_draw_line(tty, s, 0, i, menu->width + 4, px, py + i, + &grid_default_cell, NULL); + } } static void -- cgit