From 81969bb567a44325ff4e8a9f442702d80c48473d Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 7 Nov 2010 04:38:02 +0200 Subject: winex11: correctly handle non-RGB COLORREFs in BRUSH_SelectSolidBrush --- dlls/winex11.drv/brush.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/brush.c b/dlls/winex11.drv/brush.c index ffbf4cb..61f1a86 100644 --- a/dlls/winex11.drv/brush.c +++ b/dlls/winex11.drv/brush.c @@ -183,17 +183,18 @@ static Pixmap BRUSH_DitherMono( COLORREF color ) */ static void BRUSH_SelectSolidBrush( X11DRV_PDEVICE *physDev, COLORREF color ) { + COLORREF colorRGB = X11DRV_PALETTE_GetColor( physDev, color ); if ((physDev->depth > 1) && (screen_depth <= 8) && !X11DRV_IsSolidColor( color )) { /* Dithered brush */ - physDev->brush.pixmap = BRUSH_DitherColor( color, physDev->depth ); + physDev->brush.pixmap = BRUSH_DitherColor( colorRGB, physDev->depth ); physDev->brush.fillStyle = FillTiled; physDev->brush.pixel = 0; } - else if (physDev->depth == 1 && color != WHITE && color != BLACK) + else if (physDev->depth == 1 && colorRGB != WHITE && colorRGB != BLACK) { physDev->brush.pixel = 0; - physDev->brush.pixmap = BRUSH_DitherMono( color ); + physDev->brush.pixmap = BRUSH_DitherMono( colorRGB ); physDev->brush.fillStyle = FillTiled; } else -- 1.7.1