diff options
author | Thomas Adam <thomas@xteddy.org> | 2021-10-13 14:01:16 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2021-10-13 14:01:16 +0100 |
commit | fb23df679b31418dbef21bc7b98c891ee3a48d42 (patch) | |
tree | 5d685379ae3b1114a348707fd57fd0ef440e9b88 /popup.c | |
parent | aff2a473ec3c16396d6be9d61c5e5dc1201a725b (diff) | |
parent | 837ca176d1874273f3de615c75b506e1b1787a1b (diff) | |
download | rtmux-fb23df679b31418dbef21bc7b98c891ee3a48d42.tar.gz rtmux-fb23df679b31418dbef21bc7b98c891ee3a48d42.tar.bz2 rtmux-fb23df679b31418dbef21bc7b98c891ee3a48d42.zip |
Merge branch 'obsd-master' into master
Diffstat (limited to 'popup.c')
-rw-r--r-- | popup.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -211,16 +211,22 @@ popup_draw_cb(struct client *c, void *data, struct screen_redraw_ctx *rctx) u_int i, px = pd->px, py = pd->py; struct colour_palette *palette = &pd->palette; struct grid_cell gc; + struct grid_cell bgc; + struct options *o = c->session->curw->window->options; screen_init(&s, pd->sx, pd->sy, 0); screen_write_start(&ctx, &s); screen_write_clearscreen(&ctx, 8); + memcpy(&bgc, &grid_default_cell, sizeof bgc); + style_apply(&bgc, o, "popup-border-style", NULL); + bgc.attr = 0; + if (pd->flags & POPUP_NOBORDER) { screen_write_cursormove(&ctx, 0, 0, 0); screen_write_fast_copy(&ctx, &pd->s, 0, 0, pd->sx, pd->sy); } else if (pd->sx > 2 && pd->sy > 2) { - screen_write_box(&ctx, pd->sx, pd->sy); + screen_write_box(&ctx, pd->sx, pd->sy, &bgc); screen_write_cursormove(&ctx, 1, 1, 0); screen_write_fast_copy(&ctx, &pd->s, 0, 0, pd->sx - 2, pd->sy - 2); @@ -228,8 +234,10 @@ popup_draw_cb(struct client *c, void *data, struct screen_redraw_ctx *rctx) screen_write_stop(&ctx); memcpy(&gc, &grid_default_cell, sizeof gc); - gc.fg = pd->palette.fg; - gc.bg = pd->palette.bg; + style_apply(&gc, o, "popup-style", NULL); + gc.attr = 0; + palette->fg = gc.fg; + palette->bg = gc.bg; if (pd->md != NULL) { c->overlay_check = menu_check_cb; |