On Tue, 2006-02-21 at 19:11 -0500, Lillian Angel wrote: > + // This should be overridden by default Toolkit (eg. GtkToolkit). > + // If target is an instance of Container, then a > GtkLightweightContainerPeer > + // should be returned. Otherwise, an instance of > LightweightComponentPeer is > + // returned for Components. This is because, all the properties > of a > + // Container should be accessible (bounds, location etc). > + // LightweightComponentPeers really are lightweight, but a > + // GtkLightweightContainerPeer is different because it still > + // has a backing widget that tracks its bounds/location for use > + // by the native side. A GtkLightweightContainerPeer is > lightweight as > + // well because it does not allocate screen resources.
This comment should be moved out of Toolkit and into GtkToolkit. GtkLightweightContainerPeer needs to override GtkComponentPeer painting methods to be no-ops: handleEvent and postExposeEvent. GtkLightweightContainerPeer.repaint should be overridden to be LightweightComponentPeer's implementation. Overriding all these methods should eliminate the flicker we were seeing in the Swing demo: Roman pointed out that lightweight peers should never call paint directly or post paint events. With these changes, this patch looks good to me. Tom