[Mono-dev] problem: Invalidate does not propagate correctly invalidation to nested controls (+patch)

matteo tesser matteo.tesser at gmail.com
Thu Dec 17 17:19:28 EST 2009


Hi,
I noticed that both mono 2.6 and mono 2.4.3 introduce a problem in
windows.form apps (in  all versions linuxes and os x) : In some
situations, invalidate and subsequent painting is not propagated
correctly to nested controls.


The problem is due to the following change in the Control.Refresh method.
http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs?r1=140535&r2=141744&sortby=date

The old version called Control.Refresh method recursively for all
child controls . The new version  changes strategy and - correctly -
call Update  method  telling to invalidate  childrend  controls too.

The problem is in the implementation of method Control.Invalidate .  I
noticed that in mono 2.6 (2.4.3), when a control contains more than
one level of nested controls, only first level controls are
refreshed/painted.

I think that method invalidate,  when InvalidateChildren parameter is
true, should propagate recursively the invalidation  to all nested
controls.

I send  you a patch, which corrects the problem in the apps I'm working.

Thanks,
Matteo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recursive_invalidate.diff
Type: text/x-patch
Size: 635 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091217/48ccafe1/attachment.bin 


More information about the Mono-devel-list mailing list