Author: jimtabor
Date: Sat May 17 02:15:50 2014
New Revision: 63319
URL:
http://svn.reactos.org/svn/reactos?rev=63319&view=rev
Log:
[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.
Modified:
trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1]
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1] Sat May
17 02:15:50 2014
@@ -255,7 +255,7 @@
{
MENUITEMINFOW mii;
WCHAR szMenuStringBack[255];
- const WCHAR *ptrTab;
+ WCHAR *ptrTab;
HMENU hMenu = GetSystemMenu(hWnd, FALSE);
if (hMenu != NULL)
{
@@ -269,9 +269,7 @@
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);
@@ -1926,6 +1924,11 @@
GuiConsoleSwitchFullScreen(GuiData);
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);
Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Sat May
17 02:15:50 2014
@@ -806,8 +806,9 @@
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;