user: Allow menu WndProc to recognize VK_[LR]MENU.

This commit is contained in:
Thomas Kho 2006-04-26 17:44:28 -07:00 committed by Alexandre Julliard
parent bde9ca2b63
commit 76104e1ccc
2 changed files with 16 additions and 15 deletions

View File

@ -527,7 +527,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
if( HIWORD(lParam) & KEYDATA_ALT )
{
/* if( HIWORD(lParam) & ~KEYDATA_PREVSTATE ) */
if( wParam == VK_MENU && !iMenuSysKey )
if ( (wParam == VK_MENU || wParam == VK_LMENU
|| wParam == VK_RMENU) && !iMenuSysKey )
iMenuSysKey = 1;
else
iMenuSysKey = 0;
@ -550,8 +551,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
case WM_KEYUP:
case WM_SYSKEYUP:
/* Press and release F10 or ALT */
if (((wParam == VK_MENU) && iMenuSysKey) ||
((wParam == VK_F10) && iF10Key))
if (((wParam == VK_MENU || wParam == VK_LMENU || wParam == VK_RMENU)
&& iMenuSysKey) || ((wParam == VK_F10) && iF10Key))
SendMessageW( GetAncestor( hwnd, GA_ROOT ), WM_SYSCOMMAND, SC_KEYMENU, 0L );
iMenuSysKey = iF10Key = 0;
break;

View File

@ -1506,23 +1506,23 @@ static struct menu_mouse_tests_s {
BOOL _todo_wine;
} menu_tests[] = {
/* for each test, send keys or clicks and check for menu visibility */
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 0}, TRUE, TRUE }, /* test 0 */
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 0}, TRUE, FALSE }, /* test 0 */
{ INPUT_KEYBOARD, {{0}}, {VK_ESCAPE, 0}, FALSE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 0}, TRUE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 0}, TRUE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 0}, TRUE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 0}, TRUE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {'E', 0}, FALSE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 0}, TRUE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 0}, TRUE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_ESCAPE, VK_ESCAPE, 0}, FALSE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', VK_ESCAPE, 0}, TRUE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', VK_ESCAPE, 0}, TRUE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_ESCAPE, 0}, FALSE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 0}, TRUE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 0}, TRUE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 0}, TRUE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 0}, TRUE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {'E', 0}, FALSE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 'P', 0}, TRUE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 'P', 0}, TRUE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 'P', 0}, TRUE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, TRUE },
{ INPUT_KEYBOARD, {{0}}, {VK_LMENU, 'M', 'P', 0}, TRUE, FALSE },
{ INPUT_KEYBOARD, {{0}}, {'E', 0}, FALSE, FALSE },
{ INPUT_MOUSE, {{1, 2}, {0}}, {0}, TRUE, TRUE }, /* test 18 */