On Fri, 2005-08-05 at 17:36 +0200, Roman Kennke wrote: > Hi, > > I've started to look deeper into AWT and how it should work and how it > actually works in Classpath. There are some issues that are plain wrong. > This patch fixes some of them and also contains some improvements with > the caching of layouts. > > I have made some tests with the update() and paint() methods and found > that they actually work different than is documented in the spec. The > correct behaviour (according to my tests) is: > > Component.update(): Clears the background only when it is a toplevel > component or a lightweight component. Heavyweights are 100% > selfresponsible for that (as for everything other as we will see). > > Container.update(): Calls super.update() only when we are a top-level > container, otherwise directly jump into paint(). > > Container.visitChildren(): All children must be visited, even > Containers. The reason for not visiting the Containers has been that it > avoided double-painting heavyweights. However, heavyweight component > must not paint themselves when paint() is called. This is implemented > wrong here. It is actually the other way around: If the toolkit thinks > it has to paint a component, then it calls paint() _after_ the component > was painted, giving subclasses a chance to paint over the component. So, > paint() only acts as a callback here. This must also be fixed later. I > don't touch this for now since I think this could break the AWT.
Thanks for testing this; are you planning to commit these tests to Mauve? I think it would be useful to have them there for reference. Tom _______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
