Re: How get main browser window HWND under Windows to move and lock focus on NPAPI based plug-in window?

Oleksandr Gavenko <[email protected]>
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
On 2011-04-16 0:40, Boris Zbarsky wrote:
> On 4/15/11 5:32 PM, Oleksandr Gavenko wrote:
>> Such behavior show alert window when executed 'alert()'
>> call from JS: until you click 'OK' main browser window inactive.
>
> That's not the case for Firefox 4.
>
> Note that in general the browser HWND is not in the same process as your
> plug-in.
>
Oh! I afraid this situation.

Business logic of application require hold only one copy
of running plug-in per browser instance.

Currently NPAPI based plug-in testing with Firefox, Opera, Chrome,
Safary on MS Windows shown that plug-in share data across
browser pages, so when first JS call to native method
is  not finished in second call we shown MessageBox to user that
plug-in already running and immediately exit from second call
on MessageBox OK user click.

Currently syncronization done this shared memory in process:

enum {ADDON_STOPED, ADDON_RUNNING};
static int addon_running_state = ADDON_STOPED;

But seems must be rewritten with using interprocess synchronization.

As I wrote I can not get situation when plug-in loaded in separate
process (plug-in itself, I don't know if it share address space with
browser).

Which browser/version you recommend to test this issue (when 2
plug-in instances loaded in separate address space)?

-- 
Best regards!
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.