diff --git a/graphics/x11drv/bitblt.c b/graphics/x11drv/bitblt.c index 82228d337eb..c6179059a15 100644 --- a/graphics/x11drv/bitblt.c +++ b/graphics/x11drv/bitblt.c @@ -1133,9 +1133,6 @@ static BOOL BITBLT_InternalStretchBlt( DC *dcDst, INT xDst, INT yDst, useDst = (((rop >> 1) & 0x550000) != (rop & 0x550000)); if (!dcSrc && useSrc) return FALSE; - if (dcDst->w.flags & DC_DIRTY) CLIPPING_UpdateGCRegion( dcDst ); - if (dcSrc && (dcSrc->w.flags & DC_DIRTY)) CLIPPING_UpdateGCRegion( dcSrc ); - /* Map the coordinates to device coords */ xDst = dcDst->w.DCOrgX + XLPTODP( dcDst, xDst ); @@ -1423,6 +1420,8 @@ BOOL X11DRV_PatBlt( DC *dc, INT left, INT top, params.heightSrc = 0; params.rop = rop; + if (dc->w.flags & DC_DIRTY) CLIPPING_UpdateGCRegion( dc ); + X11DRV_DIB_UpdateDIBSection( dc, FALSE ); EnterCriticalSection( &X11DRV_CritSection ); result = (BOOL)CALL_LARGE_STACK( BITBLT_DoStretchBlt, ¶ms ); @@ -1456,6 +1455,10 @@ BOOL X11DRV_BitBlt( DC *dcDst, INT xDst, INT yDst, X11DRV_DIB_UpdateDIBSection( dcDst, FALSE ); X11DRV_DIB_UpdateDIBSection( dcSrc, FALSE ); + + if (dcDst->w.flags & DC_DIRTY) CLIPPING_UpdateGCRegion( dcDst ); + if (dcSrc && (dcSrc->w.flags & DC_DIRTY)) CLIPPING_UpdateGCRegion( dcSrc ); + EnterCriticalSection( &X11DRV_CritSection ); result = (BOOL)CALL_LARGE_STACK( BITBLT_DoStretchBlt, ¶ms ); LeaveCriticalSection( &X11DRV_CritSection ); @@ -1489,6 +1492,10 @@ BOOL X11DRV_StretchBlt( DC *dcDst, INT xDst, INT yDst, X11DRV_DIB_UpdateDIBSection( dcDst, FALSE ); X11DRV_DIB_UpdateDIBSection( dcSrc, FALSE ); + + if (dcDst->w.flags & DC_DIRTY) CLIPPING_UpdateGCRegion( dcDst ); + if (dcSrc && (dcSrc->w.flags & DC_DIRTY)) CLIPPING_UpdateGCRegion( dcSrc ); + EnterCriticalSection( &X11DRV_CritSection ); result = (BOOL)CALL_LARGE_STACK( BITBLT_DoStretchBlt, ¶ms ); LeaveCriticalSection( &X11DRV_CritSection );