Commit daae0d6a authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

winex11: Use logical co-ords to call GdiAlphaBlend().

parent 84bc9c3d
...@@ -2583,7 +2583,7 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO ...@@ -2583,7 +2583,7 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
BITMAPINFO *bmi = (BITMAPINFO *)buffer; BITMAPINFO *bmi = (BITMAPINFO *)buffer;
void *src_bits, *dst_bits; void *src_bits, *dst_bits;
RECT rect; RECT rect, src_rect;
HDC hdc = 0; HDC hdc = 0;
HBITMAP dib; HBITMAP dib;
BOOL ret = FALSE; BOOL ret = FALSE;
...@@ -2631,11 +2631,13 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO ...@@ -2631,11 +2631,13 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage ); memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage );
PatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS ); 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, ret = GdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
info->hdcSrc, info->hdcSrc, src_rect.left, src_rect.top,
rect.left + (info->pptSrc ? info->pptSrc->x : 0), src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
rect.top + (info->pptSrc ? info->pptSrc->y : 0),
rect.right - rect.left, rect.bottom - rect.top,
(info->dwFlags & ULW_ALPHA) ? *info->pblend : blend ); (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend );
if (ret) if (ret)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment