On Tue, 13 Dec 2005 23:53:07 +0800, you wrote:
Changelog: Dmitry Timoshkov dmitry@codeweavers.com There is no need to offset the source rectangle in the reverse direction before scrolling.
--- cvs/hq/wine/dlls/x11drv/scroll.c 2005-11-22 12:41:07.000000000 +0800 +++ wine/dlls/x11drv/scroll.c 2005-12-13 23:42:15.000000000 +0800
/* Then clip again to get the source rectangle that will remain in the * clipping rect */ rcSrc = rcClip;
- OffsetRect( &rcSrc, -dx, -dy); IntersectRect( &rcSrc, &rcSrc, &rcClip);
In the first place: with this change the IntersectRect call is a no-op
I doubt you understand the reason for "to offset the source rectangle in the reverse direction":
Scrolling should only occur in the clipping rectangle. When you talk about the *destination* pixels, a clipping with the cliprect is needed. Here we are talking about the *source* pixels, from destination to source is indeed reverse. *that* is what is happening here.
If you are not convinced: the change is wrong and clipping fails. I have added a test to confirm that. The test also gives a nice visual idea what goes wrong, just add a Sleep() or two to get the picture.
Changelog: dlls/x11drv : scroll.c dlls/user/tests : win.c Restore the previous change to X11DRV_ScrollDC. With a regression test to confirm it was wrong.
Rein.