Request for review 7156191 [macosx] Can't type into applet demos in Pivot

Dmitry Cherepanov dmitry.cherepanov at
Wed Mar 28 00:48:35 PDT 2012

Hi Anton,

Anton V. Tarasov wrote:
> Hi Dmitry,
> Let me share my thoughts on it.

Thanks for your feedback!

> Another question is whether handleFocusEvent(false) is called in 
> response  to deactivating the browser window by, say, alt-tab? I would 
> expect the methods are called in the following order:
> handleFocusEvent(false)
> handleWindowFocusEvent(false)

Not exactly. The plugin receives the FocusChanged event when it 
gains/loses focus but it doesn't receive the event when the top-level 
window becomes the active (or inactive) window (by pressing alt-tab or 
mouse click). That is, if the user deactivates the browser and then 
activates it back by pressing alt-tab twice, we receive the following 


That means we still need to activate/deactivate the embedded frame upon 
receiving the WindowFocusChanged event if the plugin gained focus before.

Indeed, we shouldn't activate/deactivate the embedded frame when the 
plugin doesn't have focus. I've updated the implementation of the 
updateOverlayWindowActiveState method:

        if (focused) {

Does it make sense? I've verified that the modified change fixes the bug 
and I haven't found any regression.

Thanks again,

More information about the macosx-port-dev mailing list