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

This commit is contained in:
Huw Davies 2011-04-18 11:23:27 +01:00 committed by Alexandre Julliard
parent 402f200c87
commit 94fbcd7ce2
1 changed files with 9 additions and 1 deletions

View File

@ -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 );