Author: jimtabor
Date: Sun Dec 4 22:35:18 2011
New Revision: 54595
URL:
http://svn.reactos.org/svn/reactos?rev=54595&view=rev
Log:
[Win32k]
- Fix crash in shutdown, see bug 6714.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] Sun Dec 4
22:35:18 2011
@@ -841,7 +841,7 @@
!IS_KEY_DOWN(gafAsyncKeyState, VK_CONTROL) &&
(wVk == VK_ESCAPE || wVk == VK_TAB))
{
- TRACE("Alt-Tab/Esc Pressed wParam %x\n",Msg.wParam);
+ TRACE("Alt-Tab/Esc Pressed wParam %x\n",wVk);
}
/* If we have a focus queue, post a keyboard message */
@@ -1065,6 +1065,17 @@
LARGE_INTEGER LargeTickCount;
BOOL bResult = FALSE;
+ switch(lpMsg->message)
+ {
+ case WM_KEYDOWN:
+ case WM_KEYUP:
+ case WM_SYSKEYDOWN:
+ case WM_SYSKEYUP:
+ break;
+ default:
+ return FALSE;
+ }
+
pWnd = UserGetWindowObject(lpMsg->hwnd);
if (!pWnd) // Must have a window!
{
@@ -1073,7 +1084,14 @@
}
pti = pWnd->head.pti;
- pKbdTbl = pti->KeyboardLayout->spkf->pKbdTbl;
+
+ if (!pti->KeyboardLayout)
+ {
+ pti->KeyboardLayout = W32kGetDefaultKeyLayout();
+ pKbdTbl = pti->KeyboardLayout->spkf->pKbdTbl;
+ }
+ else
+ pKbdTbl = pti->KeyboardLayout->spkf->pKbdTbl;
if (!pKbdTbl)
return FALSE;