GtkComponentPeer realization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2006-02-20 at 15:20 +0100, Roman Kennke wrote:
> > I don't see how/if 2) ever happens/should happen after a
> > Container.add(Component). The Container is invalid after an add().
> > When/Where should validate[Tree]() be called after a new component has
> > been added?
> 
> This is not performed automatically in AWT. We used to do it in
> setVisible somewhere if I remember correctly, but tests have shown that
> this is not right (and in fact leads to strange interactions with Swing,
> where we _do_ perform validation automatically).

OK. Thanks. That probably explains why the delayed parenting and
realization did work in the past.

>  The GTK peers therefore
> should initialize correctly even when the component is not validated and
> not try to defer things. (Actually, the AWT itself defers initialization
> of the peers themselves, they are not created with the component, but
> instead when the component receives a call to addNotify).

Yes. We do defer creation of the gtk-peer till the actual addNotify()
call. But then we also defer the parent/bound-setting if the container
is already visible till the container is actually made valid. This is at
least a problem with (sub) classes of Panel and Canvas where
applications seem to expect to be able to paint on them before they are
actually validated.

Tom, do you have an example where the delayed realization of the gtk+
component was necessary/gave strange visual effects? I like to get to
the bottom of this one.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://developer.classpath.org/pipermail/classpath/attachments/20060220/0082844a/attachment.pgp

[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux