Module: wine Branch: master Commit: 62019e6d3a768f5bdd5b16936362722f7b1261ce URL: http://source.winehq.org/git/wine.git/?a=commit;h=62019e6d3a768f5bdd5b169363...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Feb 24 00:20:12 2010 +0300
user32: Intersect with passed dirty rectangle while blitting.
---
dlls/user32/win.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/win.c b/dlls/user32/win.c index adf74d0..8ed49d8 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -3392,18 +3392,18 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINF cy = info->psize->cy; flags &= ~SWP_NOSIZE; } - TRACE( "moving window %p pos %d,%d %dx%x\n", hwnd, x, y, cx, cy ); + TRACE( "moving window %p pos %d,%d %dx%d\n", hwnd, x, y, cx, cy ); SetWindowPos( hwnd, 0, x, y, cx, cy, flags ); }
if (info->hdcSrc) { - RECT rect; HDC hdc = GetDCEx( hwnd, 0, DCX_CACHE );
if (hdc) { int x = 0, y = 0; + RECT rect;
GetClientRect( hwnd, &rect ); if (info->pptSrc) @@ -3411,10 +3411,13 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINF x = info->pptSrc->x; y = info->pptSrc->y; } - /* FIXME: intersect rect with 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 ); + + 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 ); + } ReleaseDC( hwnd, hdc ); } }