Commit 94fbcd7c authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32: Make sure that pattern brush bitmap's are created with the correct physdev.

parent 402f200c
......@@ -390,7 +390,15 @@ static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc )
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSelectBrush );
if (brush->logbrush.lbStyle == BS_PATTERN)
BITMAP_SetOwnerDC( (HBITMAP)brush->logbrush.lbHatch, physdev );
{
PHYSDEV pattern_dev = physdev;
/* FIXME: This will go away once the dib driver implements
pattern brushes */
if(pattern_dev == &dc->dibdrv.dev)
pattern_dev = GET_NEXT_PHYSDEV( physdev, pSelectBrush );
BITMAP_SetOwnerDC( (HBITMAP)brush->logbrush.lbHatch, pattern_dev );
}
GDI_inc_ref_count( handle );
GDI_ReleaseObj( handle );
......
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