edburns wrote:
> Here's the way it works.  I have a java.awt.Canvas subclass that has
> an
> addNotify() method which dives down to the native level and gets the
> NSView, gets the NSWindow from the NSView, then gets the windowRef
> from
> the NSWindow.  This gives me a Mac OS X WindowPtr reference, which is
> eventually passed to nsWebBrowser::InitWindow(), which returns NS_OK,
> as
> stated previously.

Embedding with Carbon should be doable.

The problem you have is that you are getting the underlying window 
handle from a java.awt.Canvas, which returns an NSView, which is in 
compositing mode, which means none of the drawing/updating methods are 
called when using XULRunner with Carbon widgets.

I already went through this, and it is all explained in this Eclipse 
bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=154597.

The short version is that Mozilla with Carbon widgets depends on the 
kEventWindowUpdate event to draw, but that event is never sent when a 
window is in compositing mode.  Mozilla with Cocoa widgets properly 
handles compositing mode.

So you have several options:
1) Get a handle that represents a window with compositing mode disabled.
     * I don't think this is possible.  Java always uses compositing
       mode for its windows.
2) Develop a shim that receives kEventControlDraw (used during 
HIView/NSView drawing) events and maps it to the 
kEventWindowUpdate/kEventWindowDraw events that the Mozilla Carbon code 
expects.
     * Not sure if this is even doable, but it would probably be
       difficult.
3) Use Mozilla with Cocoa widgets.


javier pedemonte
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to