NPAPI WM_WINDOWPOSCHANGED ( only on firefox ) issue



It seems their is bug in the current implementation of WM_WINDOWPOSCHANGED, at least on firefox (latest version) ( chrome seems to be behabing OK ) :

If the user resize the window to be very small, and if the NPAPI container get a size of 0, JUCE is dead looping with it's handling of WM_WINDOWPOSCHANGED. I've tried to add a "return 0", which make the dead loop go away, but then when I size the container to 0 and resize the window to something else, the NPAPI does not get resized anymore.

This is quite a problem, if someone has any fixes that would be very cool :)

code is in juce_NPAPI_GlueCode.cpp ( browser_plugin_client ), l.355. Wild guess : 

            if (w == 0 || h == 0)
                w = requestedWidth;  // On Safari, the HWND can have a zero-size, so we might need to
                h = requestedHeight; // force it to the size that the NPAPI call asked for..
                MoveWindow (parentHWND, r.left,, w, h, TRUE);

make the browser post non stop WM_WINDOWPOSCHANGED


Not sure what to suggest there.. Perhaps adding a flag to detect and prevent recursive calls being made?