Author: rharabien
Date: Fri Oct 14 14:21:51 2011
New Revision: 54134
URL:
http://svn.reactos.org/svn/reactos?rev=54134&view=rev
Log:
[WIN32K]
- Keyboard state is update when msg is peeked from queue (not posted) and before virtual
keys are simplified. Fixes 2 user32:input winetests.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Fri Oct 14
14:21:51 2011
@@ -260,32 +260,32 @@
UpdateKeyStateFromMsg(PUSER_MESSAGE_QUEUE MessageQueue, MSG* msg)
{
UCHAR key;
- BOOL down = 0;
+ BOOL down = FALSE;
TRACE("UpdateKeyStateFromMsg message:%d\n", msg->message);
switch (msg->message)
{
case WM_LBUTTONDOWN:
- down = 1;
+ down = TRUE;
/* fall through */
case WM_LBUTTONUP:
UpdateKeyState(MessageQueue, VK_LBUTTON, down);
break;
case WM_MBUTTONDOWN:
- down = 1;
+ down = TRUE;
/* fall through */
case WM_MBUTTONUP:
UpdateKeyState(MessageQueue, VK_MBUTTON, down);
break;
case WM_RBUTTONDOWN:
- down = 1;
+ down = TRUE;
/* fall through */
case WM_RBUTTONUP:
UpdateKeyState(MessageQueue, VK_RBUTTON, down);
break;
case WM_XBUTTONDOWN:
- down = 1;
+ down = TRUE;
/* fall through */
case WM_XBUTTONUP:
if (msg->wParam == XBUTTON1)
@@ -295,7 +295,7 @@
break;
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
- down = 1;
+ down = TRUE;
/* fall through */
case WM_KEYUP:
case WM_SYSKEYUP:
@@ -1215,8 +1215,6 @@
{
InsertTailList(&MessageQueue->HardwareMessagesListHead,
&Message->ListEntry);
-
- UpdateKeyStateFromMsg( MessageQueue, Msg );
}
Message->QS_Flags = MessageBits;
@@ -1720,11 +1718,11 @@
{
msg = CurrentMessage->Msg;
+ UpdateKeyStateFromMsg(MessageQueue, &msg);
AcceptMessage = co_IntProcessHardwareMessage(&msg, &Remove,
MsgFilterLow, MsgFilterHigh);
if (Remove)
{
- UpdateKeyStateFromMsg(MessageQueue, &msg);
RemoveEntryList(&CurrentMessage->ListEntry);
ClearMsgBitsMask(MessageQueue, CurrentMessage->QS_Flags);
MsqDestroyMessage(CurrentMessage);
@@ -2190,7 +2188,7 @@
{
DWORD Ret;
- UserEnterExclusive();
+ UserEnterShared();
Ret = UserGetKeyState(key);