views:

221

answers:

2

I have an old NPAPI plugin for OS X that I'm trying to refit for use with Snow Leopard's version of Safari. My problem is that when I switch Safari to 64-bit mode, it changes the plugin environment to out of process mode (where plugins are hosted by a 32-bit WebKitPluginHost process). And now my toolbar palettes are not visible on screen, even though the NSPanels on which they are based think they are visible. The documentation says that bringing up windows is not recommended, but doesn't say its prohibited; is there something I can do to bring up my Windows?

+1  A: 

Unfortunately, probably not. If you're doing anything that is not possible using the normal graphics libraries (CoreAnimation, Cocoa, etc), you probably can't do it using the 32 bit plugin in 64 bit safari.

You might be able to do more if you compile your plugin in 64 bit mode, though. I don't know :-/

Taxilian
Thanks. That's what I've been thinking too. Thus the question. Although I can't go back to confirm this, it seems like Safari 4.0.5 has gone one step further and is preventing popup menus from being displayed too.
Glenn Howes
+2  A: 

The most reliable solution is to simply let another application, possibly connected to your plugin via some IPC mechanism, do thatApple:

Avoid creating windows. The intent is for plug-ins to operate within the browser window. Although some plug-ins have historically done so, creating windows in your plug-in is not recommended. If you need to maintain separate windows, you should consider starting a separate application.

Bringing up windows from a plugin might work in some circumstances and completely break in different ones. By recommending against doing so Apple is at liberty to break your previously working behaviour whenever it wishes to.

Georg Fritzsche