Please put a break point at bookmark 1, after hitting the breakpoint, F8 step over, you should see the region is painted, then F9 continue running, you should see the region is ereased.
You could help me replace this with gtk or gdk or x11 ... APIs to paint the region bypassing LCL(Of cause I'm trying do this now too) and this is what I'm not familiar with.
Set result of param Msg of WMPaint to 1 still erease the region