aboutsummaryrefslogtreecommitdiff
path: root/screen-write.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-10-13 14:01:16 +0100
committerThomas Adam <thomas@xteddy.org>2021-10-13 14:01:16 +0100
commitfb23df679b31418dbef21bc7b98c891ee3a48d42 (patch)
tree5d685379ae3b1114a348707fd57fd0ef440e9b88 /screen-write.c
parentaff2a473ec3c16396d6be9d61c5e5dc1201a725b (diff)
parent837ca176d1874273f3de615c75b506e1b1787a1b (diff)
downloadrtmux-fb23df679b31418dbef21bc7b98c891ee3a48d42.tar.gz
rtmux-fb23df679b31418dbef21bc7b98c891ee3a48d42.tar.bz2
rtmux-fb23df679b31418dbef21bc7b98c891ee3a48d42.zip
Merge branch 'obsd-master' into master
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/screen-write.c b/screen-write.c
index c09d09ab..e3b2b977 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -645,7 +645,7 @@ screen_write_menu(struct screen_write_ctx *ctx, struct menu *menu,
memcpy(&default_gc, &grid_default_cell, sizeof default_gc);
- screen_write_box(ctx, menu->width + 4, menu->count + 2);
+ screen_write_box(ctx, menu->width + 4, menu->count + 2, NULL);
screen_write_cursormove(ctx, cx + 2, cy, 0);
format_draw(ctx, &default_gc, menu->width, menu->title, NULL);
@@ -677,16 +677,20 @@ screen_write_menu(struct screen_write_ctx *ctx, struct menu *menu,
/* Draw a box on screen. */
void
-screen_write_box(struct screen_write_ctx *ctx, u_int nx, u_int ny)
+screen_write_box(struct screen_write_ctx *ctx, u_int nx, u_int ny,
+ const struct grid_cell *gcp)
{
struct screen *s = ctx->s;
- struct grid_cell gc;
+ struct grid_cell gc;
u_int cx, cy, i;
cx = s->cx;
cy = s->cy;
- memcpy(&gc, &grid_default_cell, sizeof gc);
+ if (gcp != NULL)
+ memcpy(&gc, gcp, sizeof gc);
+ else
+ memcpy(&gc, &grid_default_cell, sizeof gc);
gc.attr |= GRID_ATTR_CHARSET;
gc.flags |= GRID_FLAG_NOPALETTE;