Re: NPP_HandleEvent not called for windows plugins?
Rudi Sherry <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.plugins |
|---|---|
| Message-ID | <[email protected]> |
Thanks! On Sep 25, 2012, at 5:19 PM, Benjamin Smedberg wrote: On 9/25/12 5:14 PM, Rudi Sherry wrote: Before I enter a bug, I want to make sure there hasn't been a change in the specification for which the document hasn't been updated. I have a simple windows plug-in that's loaded within an HTML page, being embedded using <OBJECT> (it has height and width). It does not create any hwnds, it just is an empty shell that returns NPERR_NO_ERROR (or 'true' or whatever success indicates) for everything. It's NPP_HandleEvent() function is never called (it is set in NP_GetEntryPoints()). This is correct. NPP_HandleEvent is only called for windowless plugins. By default plugins on Windows are run in windowed mode where you subclass the window from NPP_SetWindow and handle the messages directly. If you want to do a windowless-mode plugin you need to explicitly tell the browser that decision: NPN_SetValue(instance, NPPVpluginWindowBool, (void*)false); You should check first to make sure that the browser supports windowless mode. See http://mxr.mozilla.org/mozilla-central/source/dom/plugins/test/testplugin/nptest.cpp#939 for some sample code from our testplugin. --BDS