On Mon, 28 Mar 2005 07:54:12 -0500, you wrote:
As for the initial problem that I've reported (http://www.winehq.org/hypermail/wine-devel/2002/09/0748.html), you are correct, it's about interaction with the invalidated region. I've figured that while you have your hands wet in that code, maybe you can take a stab at it. Thanks for taking a look!
It is a little more complicated then the way you explain it.
First, if you do not move the window that obstructs the scrolling lists then there are no defects (use something else to cause the lists to scroll). Yet, some added tracing shows that ScrollWindowEx (creating invalidated regions) is called far more often then paintings (which validates those regions). So ScrollWindowEx will typically have to scroll invalidated regions of previous scrolls. And, as far as I can see, the code does this flawlessly.
But, if you move the window that obstructs the scrolling list around, then areas that where obstructed and get exposed must be invalidated. This happens when the exposure events are processed. Now you can imagine that the area that needs to be invalidated is different if it is processed before the scroll or after the scroll. Since there is no synchronization between exposure events and ScrollWindowEx calls, this explains why it must go wrong in some cases and we see the defects.
I've tried a few things but this is a problem that is beyond me, if it is solvable at all. Perhaps Alexandre can give a hint how this should be solved.
Rein.