user: Allow menu WndProc to recognize VK_[LR]MENU.
This commit is contained in:
parent
bde9ca2b63
commit
76104e1ccc
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue