On Tue, May 08, 2001 at 03:00:51PM +1000, Bernie Maier wrote:
> OK - I previously asked about restrictions about where Mozilla can
> be embedded under GTK+, but not when.
>
> >From further testing it appears that there shouldn't be any
> >particularly restrictions on what type of window/widget can be
> >the parent of Mozilla.
>
> However, in my tests it appears that the only examples I have of
> successfully embedding Mozilla is when I can gtk_moz_embed_new()
> before I hit the gtk_main event loop. Does anyone know if it is
> possible to successfully embed Mozilla once the loop is running?
> If so, how? Every time I've tried, it hangs. The debug output
> stops at:
>
> GFX: dpi=96 t2p=0.0666667 p2t=15 depth=24
> WEBSHELL+ = 1
>
Uh, go back and read your Gtk programming basics.
You can't (afaik) add widgets after gtk_main() is called. gtk_main never
returns, and it expects all events to be registered so it can start the
event loop and correctly notify people about things.
In general, you better call *any* gtk_whatever_new before gtk_main. Can you
give a counterexample that works?
Maybe I'm just totally wrong though. But I've never seen an example that
does otherwise.
Cheers,
Ari