Re: Strange problem when performed window message processing in NPAPI plig-in under Windows.

Benjamin Smedberg <[email protected]>
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
On 4/15/11 6:09 PM, Oleksandr Gavenko wrote:
> In function that invoked on JS call I show native Windows window
> which I create without passing parent main browser window
> (by CreateWindowEx).
This is a bit unusual and not recommended. The only case where this 
would make sense is if you were doing something like a full-screen view 
of your plugin. In that case you must make sure that this widget does 
not live longer than the plugin itself: you must destroy the widget at 
NPP_Destroy.

The typical behavior for a windowed plugin is to only manipulate the 
window which you are given.
>
> My window message processing loop:
This makes no sense at all: the browser is responsible for running the 
message loop in all circumstances I can think of: you should never be 
writing your own event processing code.

Unless perhaps you are trying to show a modal window? That's also bad: 
Firefox will kill off your plugin if the modal dialog doesn't respond 
within 45 seconds by default, and other browser may do similar kinds of 
things. It is not expected that you ever show modal UI from within your 
plugin.

--BDS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.