mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[ConSrv]
- Move Alt-Escape, Space and Tab to ConWndProc, disable GuiProcessKeyCallback. - Alt-Space was not getting launched out of GuiProcessKeyCallback. The key needed translated. - Reduce code for system menus. svn path=/trunk/; revision=63319
This commit is contained in:
parent
fdc93df98f
commit
ef2221fd12
2 changed files with 10 additions and 6 deletions
|
@ -255,7 +255,7 @@ CreateSysMenu(HWND hWnd)
|
|||
{
|
||||
MENUITEMINFOW mii;
|
||||
WCHAR szMenuStringBack[255];
|
||||
const WCHAR *ptrTab;
|
||||
WCHAR *ptrTab;
|
||||
HMENU hMenu = GetSystemMenu(hWnd, FALSE);
|
||||
if (hMenu != NULL)
|
||||
{
|
||||
|
@ -269,9 +269,7 @@ CreateSysMenu(HWND hWnd)
|
|||
ptrTab = wcschr(szMenuStringBack, '\t');
|
||||
if (ptrTab)
|
||||
{
|
||||
mii.cch = (int)( ptrTab - szMenuStringBack);
|
||||
RtlZeroMemory((PVOID)ptrTab, mii.cch);
|
||||
|
||||
*ptrTab = '\0';
|
||||
mii.cch = wcslen(szMenuStringBack);
|
||||
|
||||
SetMenuItemInfoW(hMenu, SC_CLOSE, FALSE, &mii);
|
||||
|
@ -1927,6 +1925,11 @@ ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
break;
|
||||
}
|
||||
/* Detect Alt-Esc/Space/Tab presses defer to DefWindowProc */
|
||||
if ( (HIWORD(lParam) & KF_ALTDOWN) && (wParam == VK_ESCAPE || wParam == VK_SPACE || wParam == VK_TAB))
|
||||
{
|
||||
return DefWindowProcW(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
|
||||
OnKey(GuiData, msg, wParam, lParam);
|
||||
break;
|
||||
|
|
|
@ -806,8 +806,9 @@ GuiProcessKeyCallback(IN OUT PFRONTEND This,
|
|||
if ((ShiftState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED) || KeyStateMenu & 0x80) &&
|
||||
(VirtualKeyCode == VK_ESCAPE || VirtualKeyCode == VK_TAB || VirtualKeyCode == VK_SPACE))
|
||||
{
|
||||
DefWindowProcW(msg->hwnd, msg->message, msg->wParam, msg->lParam);
|
||||
return TRUE;
|
||||
DPRINT1("GuiProcessKeyCallback\n");
|
||||
//DefWindowProcW(msg->hwnd, msg->message, msg->wParam, msg->lParam);
|
||||
//return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue