From daae0d6adc5dca126c43a143c460d1bb66336be3 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 27 Jun 2017 16:40:36 +0100 Subject: [PATCH] winex11: Use logical co-ords to call GdiAlphaBlend(). Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/winex11.drv/window.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index ea4933f00e7..eaf6dcfa3ed 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2583,7 +2583,7 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; BITMAPINFO *bmi = (BITMAPINFO *)buffer; void *src_bits, *dst_bits; - RECT rect; + RECT rect, src_rect; HDC hdc = 0; HBITMAP dib; BOOL ret = FALSE; @@ -2631,11 +2631,13 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage ); PatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS ); } + src_rect = rect; + if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); + DPtoLP( info->hdcSrc, (POINT *)&src_rect, 2 ); + ret = GdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, - info->hdcSrc, - rect.left + (info->pptSrc ? info->pptSrc->x : 0), - rect.top + (info->pptSrc ? info->pptSrc->y : 0), - rect.right - rect.left, rect.bottom - rect.top, + info->hdcSrc, src_rect.left, src_rect.top, + src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend ); if (ret) {