Huw Davies : gdi32: Make sure that pattern brush bitmap' s are created with the correct physdev.
Module: wine Branch: master Commit: 94fbcd7ce286ee7c88d1a2ee0e02b9f1e7a4f4d2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=94fbcd7ce286ee7c88d1a2ee0e... Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Apr 18 11:23:27 2011 +0100 gdi32: Make sure that pattern brush bitmap's are created with the correct physdev. --- dlls/gdi32/brush.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index a1d22fc..781e446 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -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 );
participants (1)
-
Alexandre Julliard