зеркало из https://github.com/mozilla/pjs.git
Trying to fix Thunderbird bustage, Bug 360731
This commit is contained in:
Родитель
519b394a74
Коммит
46603e8c42
|
@ -3464,7 +3464,8 @@ PRBool nsWindow::DispatchKeyEvent(PRUint32 aEventType, WORD aCharCode, UINT aVir
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
BOOL nsWindow::OnKeyDown(UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
|
BOOL nsWindow::OnKeyDown(UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
|
||||||
{
|
{
|
||||||
// VK_BROWSER_BACK and VK_BROWSER_FORWARD are converted to nsAppCommandEvents
|
#ifdef VK_BROWSER_BACK
|
||||||
|
// VK_BROWSER_BACK and VK_BROWSER_FORWARD are converted to nsCommandEvents
|
||||||
if (aVirtualKeyCode == VK_BROWSER_BACK)
|
if (aVirtualKeyCode == VK_BROWSER_BACK)
|
||||||
{
|
{
|
||||||
DispatchCommandEvent(APPCOMMAND_BROWSER_BACKWARD);
|
DispatchCommandEvent(APPCOMMAND_BROWSER_BACKWARD);
|
||||||
|
@ -3475,6 +3476,7 @@ BOOL nsWindow::OnKeyDown(UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
|
||||||
DispatchCommandEvent(APPCOMMAND_BROWSER_FORWARD);
|
DispatchCommandEvent(APPCOMMAND_BROWSER_FORWARD);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
gKbdLayout.OnKeyDown (aVirtualKeyCode);
|
gKbdLayout.OnKeyDown (aVirtualKeyCode);
|
||||||
|
|
||||||
|
@ -3678,8 +3680,11 @@ BOOL nsWindow::OnKeyDown(UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
BOOL nsWindow::OnKeyUp( UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
|
BOOL nsWindow::OnKeyUp( UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
|
||||||
{
|
{
|
||||||
|
#ifdef VK_BROWSER_BACK
|
||||||
if (aVirtualKeyCode == VK_BROWSER_BACK || aVirtualKeyCode == VK_BROWSER_FORWARD)
|
if (aVirtualKeyCode == VK_BROWSER_BACK || aVirtualKeyCode == VK_BROWSER_FORWARD)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#endif
|
||||||
|
|
||||||
aVirtualKeyCode = sIMEIsComposing ? aVirtualKeyCode : MapFromNativeToDOM(aVirtualKeyCode);
|
aVirtualKeyCode = sIMEIsComposing ? aVirtualKeyCode : MapFromNativeToDOM(aVirtualKeyCode);
|
||||||
BOOL result = DispatchKeyEvent(NS_KEY_UP, 0, aVirtualKeyCode, aKeyData);
|
BOOL result = DispatchKeyEvent(NS_KEY_UP, 0, aVirtualKeyCode, aKeyData);
|
||||||
return result;
|
return result;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче