Alexandre,
After the update region handling moved to the server, Xnews gets in an endless loop when the windows with news groups is scrolled.
The endless loop is in user/painting.c. Calling sequence is ScrollWindowEx(... SW_ERASE|SW_INVALIDATE)-> RedrawWindow(..., RDW_INVALIDATE|RDW_ERASE|RDW_ERASENOW)-> erase_now()
In erase_now() the aptly coded endless loop is never broken out, and loops on the same window over and over. Before the change this was coded quite differently (traversing the window's child tree) and could not loop indefinitely. I am quite stuck what should be the reason why the loop is expected to end in the first place. Perhaps you want to have a look.
Xnews can be downloaded from all over the net, for example: http://xnews.newsguy.com/release/xnews.zip
Unzip it in a directory of your choice; run xnews.exe; enter the host name of a news server; confirm that you want to download the list of newsgroups; you get a window with newsgroups, try to scroll down the list.
Rein.
Rein Klazes wijn@wanadoo.nl writes:
In erase_now() the aptly coded endless loop is never broken out, and loops on the same window over and over. Before the change this was coded quite differently (traversing the window's child tree) and could not loop indefinitely. I am quite stuck what should be the reason why the loop is expected to end in the first place. Perhaps you want to have a look.
The loop ends because erasing the window clears the erase bits. Unfortunately in that case the app does a RedrawWindow(RDW_ERASE) inside the WM_ERASEBKGND handler, so the window is marked as needing erase again. The algorithm will probably need to be changed, but the first step would be to write a test case and see how Windows behaves in that case.