user32: Use whole window rectangle for UpdateLayeredWindow

Alexandre Julliard julliard at winehq.org
Wed Feb 24 06:57:42 CST 2010


Nikolay Sivov <nsivov at codeweavers.com> writes:

> @@ -3398,14 +3398,14 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINF
>  
>      if (info->hdcSrc)
>      {
> -        HDC hdc = GetDCEx( hwnd, 0, DCX_CACHE );
> +        HDC hdc = GetWindowDC( hwnd );
>  
>          if (hdc)
>          {
>              int x = 0, y = 0;
>              RECT rect;
>  
> -            GetClientRect( hwnd, &rect );
> +            GetWindowRect( hwnd, &rect );
>              if (info->pptSrc)
>              {
>                  x = info->pptSrc->x;
> @@ -3415,8 +3415,8 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINF
>              if (!info->prcDirty || (info->prcDirty && IntersectRect(&rect, &rect, info->prcDirty)))
>              {
>                  TRACE( "copying window %p pos %d,%d\n", hwnd, x, y );
> -                BitBlt( hdc, rect.left, rect.top, rect.right, rect.bottom,
> -                        info->hdcSrc, rect.left + x, rect.top + y, SRCCOPY );
> +                BitBlt( hdc, 0, 0, rect.right - rect.left, rect.bottom - rect.top,
> +                        info->hdcSrc, x, y, SRCCOPY );

Shouldn't you map prcDirty to window coordinates before intersecting?

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list