Directly generate EVT_CONTEXT_MENU when Applications (Menu) key is pressed

WM_CONTEXTMENU message is generated directly by the system when the user presses and releases the VK_APPS key so there is no need to do this by emulating right mouse button click.

Closes #17969.
This commit is contained in:
Artur Wieczorek
2017-10-09 16:14:50 +02:00
parent f34a6253c7
commit 2c69d27c0d

View File

@@ -3055,12 +3055,6 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
case VK_OEM_PERIOD: case VK_OEM_PERIOD:
break; break;
// special case of VK_APPS: treat it the same as right mouse
// click because both usually pop up a context menu
case VK_APPS:
processed = HandleMouseEvent(WM_RBUTTONDOWN, -1, -1, 0);
break;
default: default:
if ( (wParam >= '0' && wParam <= '9') || if ( (wParam >= '0' && wParam <= '9') ||
(wParam >= 'A' && wParam <= 'Z') ) (wParam >= 'A' && wParam <= 'Z') )
@@ -3096,15 +3090,7 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
case WM_SYSKEYUP: case WM_SYSKEYUP:
case WM_KEYUP: case WM_KEYUP:
// special case of VK_APPS: treat it the same as right mouse button processed = HandleKeyUp((WORD) wParam, lParam);
if ( wParam == VK_APPS )
{
processed = HandleMouseEvent(WM_RBUTTONUP, -1, -1, 0);
}
else
{
processed = HandleKeyUp((WORD) wParam, lParam);
}
break; break;
case WM_SYSCHAR: case WM_SYSCHAR: