mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 559943 - cleanup of existing reply message handlers and add wm_contextmenu to address silverlight hang. r=bsmedberg.
--HG-- extra : rebase_source : eec00baf601f98d309b7393950037d68aa18a404
This commit is contained in:
parent
f21f1e8e3e
commit
b5f0594b55
@ -3813,28 +3813,35 @@ nsWindow::IPCWindowProcHandler(UINT& msg, WPARAM& wParam, LPARAM& lParam)
|
||||
// Handle certain sync plugin events sent to the parent which
|
||||
// trigger ipc calls that result in deadlocks.
|
||||
|
||||
// Plugins taking or losing focus triggering focus app messages.
|
||||
if ((msg == WM_SETFOCUS || msg == WM_KILLFOCUS) &&
|
||||
(InSendMessageEx(NULL)&(ISMEX_REPLIED|ISMEX_SEND)) == ISMEX_SEND) {
|
||||
ReplyMessage(0);
|
||||
return;
|
||||
DWORD dwResult = 0;
|
||||
PRBool handled = PR_FALSE;
|
||||
|
||||
switch(msg) {
|
||||
// Windowless flash sending WM_ACTIVATE events to the main window
|
||||
// via calls to ShowWindow.
|
||||
case WM_ACTIVATE:
|
||||
if (lParam != 0 && LOWORD(wParam) == WA_ACTIVE &&
|
||||
IsWindow((HWND)lParam))
|
||||
handled = PR_TRUE;
|
||||
break;
|
||||
|
||||
// Plugins taking or losing focus triggering focus app messages.
|
||||
// dwResult = 0
|
||||
case WM_SETFOCUS:
|
||||
case WM_KILLFOCUS:
|
||||
// Windowed plugins that pass sys key events to defwndproc generate
|
||||
// WM_SYSCOMMAND events to the main window.
|
||||
case WM_SYSCOMMAND:
|
||||
// Windowed plugins that fire context menu selection events to parent
|
||||
// windows.
|
||||
case WM_CONTEXTMENU:
|
||||
handled = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Windowless flash sending WM_ACTIVATE events to the main window
|
||||
// via calls to ShowWindow.
|
||||
if (msg == WM_ACTIVATE && lParam != 0 &&
|
||||
LOWORD(wParam) == WA_ACTIVE && IsWindow((HWND)lParam) &&
|
||||
if (handled &&
|
||||
(InSendMessageEx(NULL)&(ISMEX_REPLIED|ISMEX_SEND)) == ISMEX_SEND) {
|
||||
ReplyMessage(0);
|
||||
return;
|
||||
}
|
||||
|
||||
// Windowed plugins that pass sys key events to defwndproc generate
|
||||
// WM_SYSCOMMAND events to the main window.
|
||||
if (msg == WM_SYSCOMMAND &&
|
||||
(InSendMessageEx(NULL)&(ISMEX_REPLIED|ISMEX_SEND)) == ISMEX_SEND) {
|
||||
ReplyMessage(0);
|
||||
return;
|
||||
ReplyMessage(dwResult);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user