mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Fix for regression bug 241447: typed characters are doubled if flash content is playing.
r=dean_tessman sr=bryner
This commit is contained in:
parent
94ebf8561b
commit
36ed2bc358
@ -3009,14 +3009,14 @@ BOOL nsWindow::OnKeyDown(UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
|
||||
}
|
||||
|
||||
MSG msg;
|
||||
BOOL gotMsg = ::PeekMessage(&msg, mWnd, 0, 0, PM_NOREMOVE | PM_NOYIELD);
|
||||
BOOL gotMsg = ::PeekMessage(&msg, mWnd, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE | PM_NOYIELD);
|
||||
// Enter and backspace are always handled here to avoid for example the
|
||||
// confusion between ctrl-enter and ctrl-J.
|
||||
if (virtualKeyCode == NS_VK_RETURN || virtualKeyCode == NS_VK_BACK)
|
||||
{
|
||||
// Remove a possible WM_CHAR or WM_SYSCHAR from the message queue
|
||||
if (gotMsg && (msg.message == WM_CHAR || msg.message == WM_SYSCHAR)) {
|
||||
::GetMessage(&msg, mWnd, 0, 0);
|
||||
::GetMessage(&msg, mWnd, WM_KEYFIRST, WM_KEYLAST);
|
||||
}
|
||||
}
|
||||
else if (gotMsg &&
|
||||
|
Loading…
Reference in New Issue
Block a user