bgPixel (unsigned long) is 64-bit on x86_64, so -1 != 0xffffffff

This patch should fix bug 8080.
(cherry picked from commit 9adea80703)
This commit is contained in:
Hong Liu 2007-09-04 08:46:46 +01:00 committed by Daniel Stone
parent f4bcb53e86
commit 41f735fbe0

View File

@ -80,10 +80,11 @@ XAAValidateGC(
}
if(pGC->depth != 32) {
if(pGC->bgPixel == -1) /* -1 is reserved for transparency */
pGC->bgPixel = 0x7fffffff;
if(pGC->fgPixel == -1) /* -1 is reserved for transparency */
pGC->fgPixel = 0x7fffffff;
/* 0xffffffff is reserved for transparency */
if(pGC->bgPixel == 0xffffffff)
pGC->bgPixel = 0x7fffffff;
if(pGC->fgPixel == 0xffffffff)
pGC->fgPixel = 0x7fffffff;
}
if((pDraw->type == DRAWABLE_PIXMAP) && !IS_OFFSCREEN_PIXMAP(pDraw)){