Bug 306209 Should fire NS_FOCUSCONTENT event on nsPluginInstanceOwner by clicking plugin's content patch by VYV03354@nifty.ne.jp r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@180488 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ce65db1263
commit
34356f5802
@ -52,6 +52,7 @@
|
||||
|
||||
#include "plevent.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsGUIEvent.h"
|
||||
|
||||
#include "nsIPluginInstancePeer.h"
|
||||
#include "nsIPluginInstanceInternal.h"
|
||||
@ -286,6 +287,25 @@ static LRESULT CALLBACK PluginWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
||||
enablePopups = PR_TRUE;
|
||||
|
||||
break;
|
||||
|
||||
#ifndef WINCE
|
||||
case WM_MOUSEACTIVATE: {
|
||||
// This seems to be the only way we're
|
||||
// notified when a child window that doesn't have this handler proc
|
||||
// (read as: windows created by plugins like Adobe Acrobat)
|
||||
// has been activated via clicking.
|
||||
// should be handled here because some plugins won't forward
|
||||
// messages to original WinProc.
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
win->GetPluginWidget(getter_AddRefs(widget));
|
||||
if (widget) {
|
||||
nsFocusEvent event(PR_TRUE, NS_PLUGIN_ACTIVATE, widget);
|
||||
nsEventStatus status;
|
||||
widget->DispatchEvent(&event, status);
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Macromedia Flash plugin may flood the message queue with some special messages
|
||||
|
||||
@ -4521,16 +4521,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
||||
break;
|
||||
|
||||
#ifndef WINCE
|
||||
case WM_MOUSEACTIVATE:
|
||||
{
|
||||
// This seems to be the only way we're
|
||||
// notified when a child window that doesn't have this handler proc
|
||||
// (read as: windows created by plugins like Adobe Acrobat)
|
||||
// has been activated via clicking.
|
||||
DispatchFocus(NS_PLUGIN_ACTIVATE, isMozWindowTakingFocus);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
{
|
||||
LPWINDOWPOS info = (LPWINDOWPOS) lParam;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user