Commit 208aeedc authored by Vladimir Panteleev's avatar Vladimir Panteleev Committed by Alexandre Julliard

winex11: Correctly handle non-RGB COLORREFs in BRUSH_SelectSolidBrush.

parent d7d5fb0a
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment