winex11: Fix alpha blending in X11DRV_UpdateLayeredWindow.

Alexandre Julliard julliard at winehq.org
Tue Feb 7 10:08:11 CST 2017


Sebastian Lackner <sebastian at fds-team.de> writes:

> @@ -2627,14 +2627,12 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
>      {
>          IntersectRect( &rect, &rect, info->prcDirty );
>          memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage );
> -        PatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS );
> -    }
> -    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->dwFlags & ULW_ALPHA) ? *info->pblend : blend );
> +    }
> +    ret = BitBlt( 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),
> +                  SRCCOPY );

BitBlt is not guaranteed to set a valid alpha channel.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list