From 2f29c42fbf7d490b95e0026deb42911ab9c0fa2f Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 8 Mar 2010 19:41:34 +0100 Subject: [PATCH] Fix colorkeying in pixman_utils.c We were masking out the alpha bit in the key color not int the source pixel, so colorkeying didn't work when the high byte was != 0. For instance in the shutdown dialog in XP. --- common/pixman_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/pixman_utils.c b/common/pixman_utils.c index 30e8919..7aff30b 100644 --- a/common/pixman_utils.c +++ b/common/pixman_utils.c @@ -816,10 +816,11 @@ void spice_pixman_blit_colorkey (pixman_image_t *dest, uint32_t *d = (uint32_t *)byte_line; uint32_t *s = (uint32_t *)byte_line; + transparent_color &= 0xffffff; s = (uint32_t *)src_line; for (x = 0; x < width; x++) { uint32_t val = *s; - if (val != (0xffffff & transparent_color)) { + if ((0xffffff & val) != transparent_color) { *d = val; } s++; d++;