mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[Win32k]
- Move window check to the API interface. svn path=/trunk/; revision=56836
This commit is contained in:
parent
473a15261d
commit
1cf37c2465
2 changed files with 13 additions and 13 deletions
|
@ -845,6 +845,7 @@ ProcessKeyEvent(WORD wVk, WORD wScanCode, DWORD dwFlags, BOOL bInjected, DWORD d
|
|||
|
||||
/* If we have a focus queue, post a keyboard message */
|
||||
pFocusQueue = IntGetFocusMessageQueue();
|
||||
TRACE("ProcessKeyEvent Q 0x%p Focus pWnd 0x%p\n",pFocusQueue, pFocusQueue ? pFocusQueue->spwndFocus : 0);
|
||||
if (bIsDown && wVk == VK_SNAPSHOT)
|
||||
{
|
||||
if (pFocusQueue &&
|
||||
|
@ -1062,7 +1063,6 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
|||
WCHAR wch[3] = { 0 };
|
||||
MSG NewMsg = { 0 };
|
||||
PKBDTABLES pKbdTbl;
|
||||
PWND pWnd;
|
||||
LARGE_INTEGER LargeTickCount;
|
||||
BOOL bResult = FALSE;
|
||||
|
||||
|
@ -1077,14 +1077,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
pWnd = UserGetWindowObject(lpMsg->hwnd);
|
||||
if (!pWnd) // Must have a window!
|
||||
{
|
||||
ERR("No Window for Translate.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pti = pWnd->head.pti;
|
||||
pti = PsGetCurrentThreadWin32Thread();
|
||||
|
||||
if (!pti->KeyboardLayout)
|
||||
{
|
||||
|
|
|
@ -2116,12 +2116,12 @@ NtUserDispatchMessage(PMSG UnsafeMsgInfo)
|
|||
return Res;
|
||||
}
|
||||
|
||||
|
||||
BOOL APIENTRY
|
||||
NtUserTranslateMessage(LPMSG lpMsg, UINT flags)
|
||||
{
|
||||
MSG SafeMsg;
|
||||
BOOL Ret;
|
||||
PWND pWnd;
|
||||
|
||||
_SEH2_TRY
|
||||
{
|
||||
|
@ -2136,9 +2136,16 @@ NtUserTranslateMessage(LPMSG lpMsg, UINT flags)
|
|||
_SEH2_END;
|
||||
|
||||
UserEnterExclusive();
|
||||
|
||||
Ret = IntTranslateKbdMessage(&SafeMsg, flags);
|
||||
|
||||
pWnd = UserGetWindowObject(SafeMsg.hwnd);
|
||||
if (pWnd) // Must have a window!
|
||||
{
|
||||
Ret = IntTranslateKbdMessage(&SafeMsg, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR("No Window for Translate. hwnd 0x%p Msg %d\n",SafeMsg.hwnd,SafeMsg.message);
|
||||
Ret = FALSE;
|
||||
}
|
||||
UserLeave();
|
||||
|
||||
return Ret;
|
||||
|
|
Loading…
Reference in a new issue