config+render: move alpha-mode to colors.alpha-mode, fix cursor handling

Move main.alpha-mode to colors.alpha-mode.

Fix (inverted) cursor handling, by always using the bg color without
alpha.

Do a minor optimization, where we don't even lock at colors.alpha-mode
if there's no transparency configured.
This commit is contained in:
Daniel Eklöf 2025-04-14 16:58:23 +02:00
parent bacfba135d
commit d2d4f53861
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 74 additions and 78 deletions

View file

@ -167,8 +167,6 @@ struct config {
enum { STARTUP_WINDOWED, STARTUP_MAXIMIZED, STARTUP_FULLSCREEN } startup_mode;
enum { ALPHA_MODE_DEFAULT, ALPHA_MODE_MATCHING, ALPHA_MODE_ALL } alpha_mode;
bool dpi_aware;
enum {GAMMA_CORRECT_DISABLED,
GAMMA_CORRECT_ENABLED,
@ -260,6 +258,12 @@ struct config {
uint32_t dim[8];
uint32_t sixel[16];
enum {
ALPHA_MODE_DEFAULT,
ALPHA_MODE_MATCHING,
ALPHA_MODE_ALL
} alpha_mode;
struct {
uint32_t fg;
uint32_t bg;