Merge ff388cfb40f90db1cba47b5acd043cefc9679b02 into 8475ff4fdbc9f60dd7182393ec06e770ee505a7b

This commit is contained in:
emcze 2014-08-08 12:35:44 +00:00
commit cbac475436

4
bar.c
View File

@ -164,8 +164,8 @@ parse_color (const char *str, char **end, const uint32_t def)
* Don't do anything if we didn't acquire a rgba visual. */
if (visual != scr->root_visual) {
const uint8_t a = ((tmp>>24)&255);
const uint32_t t1 = (tmp&0xff00ff) * (0x100-a);
const uint32_t t2 = (tmp&0x00ff00) * (0x100-a);
const uint32_t t1 = (tmp&0xff00ff) * a / 0x100;
const uint32_t t2 = (tmp&0x00ff00) * a / 0x100;
tmp = (a<<24)|(t1&0xff00ff)|(t2&0x00ff00);
}
return tmp;