Ticket #1657: Transparency support is broken in 4.7.0-pre3

The latest version breaks transparency support.
If I'd change _default_ to lightgray;default in the [core] section, the panels are unreadable.
It looks like the _default_ variable interpreted as lightgray;lightgray.

Fix Issue: do not apply COLOR_WHITE as mask if color value equal to -1

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2010-01-15 13:19:08 +02:00
parent d9384a6518
commit 57a6a26be7

View File

@ -171,10 +171,13 @@ tty_color_try_alloc_pair_lib (tty_color_pair_t * mc_color_pair)
break;
}
} else {
int mask_fg = (mc_color_pair->ifg == -1) ? mc_color_pair->ifg : 0xff;
int mask_bg = (mc_color_pair->ibg == -1) ? mc_color_pair->ibg : 0xff;
init_pair (mc_color_pair->pair_index,
mc_tty_color_save_attr_lib (mc_color_pair->pair_index,
mc_color_pair->ifg) & COLOR_WHITE,
mc_color_pair->ibg & COLOR_WHITE);
mc_color_pair->ifg) & mask_fg,
mc_color_pair->ibg & mask_bg);
}
}