sixel: calculate default bg once, in init

We have all information we need to calculate the default background
color in sixel_init():

* Whether the image have transparency or not
* The current ANSI background color
This commit is contained in:
Daniel Eklöf 2021-09-05 10:27:13 +02:00
parent f39a62fa5e
commit f9642e9597
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 11 additions and 15 deletions

View file

@ -576,6 +576,7 @@ struct terminal {
unsigned param_idx; /* Parameters seen */
bool transparent_bg;
uint32_t default_bg;
/* Application configurable */
unsigned palette_size; /* Number of colors in palette */