diff options
author | nicm <nicm> | 2021-10-25 09:22:17 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-10-25 09:22:17 +0000 |
commit | 0cca695d6e75426e295e03668a4ed35ee62afe7c (patch) | |
tree | 6da5bb9a98cb7e9e16dea5645a0db7a5f932bb08 /screen-write.c | |
parent | 9b4148b12ca631b9cb8f48a03adb1fad146ee53d (diff) | |
download | rtmux-0cca695d6e75426e295e03668a4ed35ee62afe7c.tar.gz rtmux-0cca695d6e75426e295e03668a4ed35ee62afe7c.tar.bz2 rtmux-0cca695d6e75426e295e03668a4ed35ee62afe7c.zip |
Instead of setting the popup default colours in the draw callback, set
it up in popup_display and follow the same routine as panes in the draw
and init_ctx callbacks - use the palette if the option value is default.
Allows application-set fg and bg to work in panes again.
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/screen-write.c b/screen-write.c index e2904ef6..251ca823 100644 --- a/screen-write.c +++ b/screen-write.c @@ -184,8 +184,10 @@ screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx, if (ctx->init_ctx_cb != NULL) { ctx->init_ctx_cb(ctx, ttyctx); if (ttyctx->palette != NULL) { - ttyctx->defaults.fg = ttyctx->palette->fg; - ttyctx->defaults.bg = ttyctx->palette->bg; + if (COLOUR_DEFAULT(ttyctx->defaults.fg)) + ttyctx->defaults.fg = ttyctx->palette->fg; + if (COLOUR_DEFAULT(ttyctx->defaults.bg)) + ttyctx->defaults.bg = ttyctx->palette->bg; } } else { ttyctx->redraw_cb = screen_write_redraw_cb; |