Bug 356154 - "Alt+Letter doesn't activate the native menu of an embedder" [p=boissomag@free.fr (Dorian) r=emaijala sr+a1.9=roc]

This commit is contained in:
reed@reedloden.com 2007-10-19 00:44:11 -07:00
Родитель 947868cb37
Коммит 4d0caa3e19
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -3296,7 +3296,12 @@ BOOL nsWindow::OnKeyDown(UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
(msg.message == WM_SYSCHAR) ? "WM_SYSCHAR" : "WM_CHAR",
msg.wParam, msg.wParam, msg.lParam);
#endif
return OnChar(msg.wParam, msg.lParam, extraFlags);
BOOL result = OnChar(msg.wParam, msg.lParam, extraFlags);
// If a syschar keypress wasn't processed, Windows may want to
// handle it to activate a native menu.
if (!result && msg.message == WM_SYSCHAR)
::DefWindowProcW(mWnd, msg.message, msg.wParam, msg.lParam);
return result;
} else if (!mIsControlDown && !mIsAltDown &&
(KeyboardLayout::IsPrintableCharKey(aVirtualKeyCode) ||
KeyboardLayout::IsNumpadKey(aVirtualKeyCode)))