diff --git a/graphics/x11drv/bitblt.c b/graphics/x11drv/bitblt.c index 1ce1a0a5fd1..4eb220ef2c4 100644 --- a/graphics/x11drv/bitblt.c +++ b/graphics/x11drv/bitblt.c @@ -1115,6 +1115,16 @@ static BOOL BITBLT_InternalStretchBlt( DC *dcDst, INT xDst, INT yDst, X11DRV_PDEVICE *physDevSrc = NULL; X11DRV_PDEVICE *physDevDst = (X11DRV_PDEVICE *)dcDst->physDev; + /* compensate for off-by-one shifting for negative widths and heights */ + if (widthDst < 0) + ++xDst; + if (heightDst < 0) + ++yDst; + if (widthSrc < 0) + ++xSrc; + if (heightSrc < 0) + ++ySrc; + if(dcSrc) physDevSrc = (X11DRV_PDEVICE *)dcSrc->physDev; usePat = (((rop >> 4) & 0x0f0000) != (rop & 0x0f0000)); useSrc = (((rop >> 2) & 0x330000) != (rop & 0x330000)); diff --git a/windows/nonclient.c b/windows/nonclient.c index 30c9a84ac18..0a71f835018 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -1229,9 +1229,9 @@ static void NC_DrawFrame( HDC hdc, RECT *rect, BOOL dlgFrame, rect->right - rect->left, height, PATCOPY ); PatBlt( hdc, rect->left, rect->top, width, rect->bottom - rect->top, PATCOPY ); - PatBlt( hdc, rect->left, rect->bottom, + PatBlt( hdc, rect->left, rect->bottom - 1, rect->right - rect->left, -height, PATCOPY ); - PatBlt( hdc, rect->right, rect->top, + PatBlt( hdc, rect->right - 1, rect->top, -width, rect->bottom - rect->top, PATCOPY ); if (dlgFrame) @@ -1331,9 +1331,9 @@ static void NC_DrawFrame95( rect->right - rect->left, height, PATCOPY ); PatBlt( hdc, rect->left, rect->top, width, rect->bottom - rect->top, PATCOPY ); - PatBlt( hdc, rect->left, rect->bottom, + PatBlt( hdc, rect->left, rect->bottom - 1, rect->right - rect->left, -height, PATCOPY ); - PatBlt( hdc, rect->right, rect->top, + PatBlt( hdc, rect->right - 1, rect->top - 1, -width, rect->bottom - rect->top, PATCOPY ); InflateRect( rect, -width, -height );