Author: mjmartin Date: Sun May 2 13:34:13 2010 New Revision: 47080
URL: http://svn.reactos.org/svn/reactos?rev=47080&view=rev Log: [win32k] - IntMouseInput: Add the state of virtual keys to wParam before calling MsqInsertSystemMessage. Fixes bug #5066. - Add and Remove MK_XBUTTON1/2 flags to CurInfo->ButtonsDown vice XBUTTON1/2. - Code based on patches in bug #5066.
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] Sun May 2 13:34:13 2010 @@ -1111,7 +1111,7 @@ /* * Insert the messages into the system queue */ - Msg.wParam = CurInfo->ButtonsDown; + Msg.wParam = 0; Msg.lParam = MAKELPARAM(MousePos.x, MousePos.y); Msg.pt = MousePos;
@@ -1134,6 +1134,7 @@ gQueueKeyStateTable[VK_LBUTTON] |= 0xc0; Msg.message = SwapBtnMsg[0][SwapButtons]; CurInfo->ButtonsDown |= SwapBtn[SwapButtons]; + Msg.wParam |= CurInfo->ButtonsDown; MsqInsertSystemMessage(&Msg); } else if(mi->dwFlags & MOUSEEVENTF_LEFTUP) @@ -1141,6 +1142,7 @@ gQueueKeyStateTable[VK_LBUTTON] &= ~0x80; Msg.message = SwapBtnMsg[1][SwapButtons]; CurInfo->ButtonsDown &= ~SwapBtn[SwapButtons]; + Msg.wParam |= CurInfo->ButtonsDown; MsqInsertSystemMessage(&Msg); } if(mi->dwFlags & MOUSEEVENTF_MIDDLEDOWN) @@ -1148,6 +1150,7 @@ gQueueKeyStateTable[VK_MBUTTON] |= 0xc0; Msg.message = WM_MBUTTONDOWN; CurInfo->ButtonsDown |= MK_MBUTTON; + Msg.wParam |= CurInfo->ButtonsDown; MsqInsertSystemMessage(&Msg); } else if(mi->dwFlags & MOUSEEVENTF_MIDDLEUP) @@ -1155,6 +1158,7 @@ gQueueKeyStateTable[VK_MBUTTON] &= ~0x80; Msg.message = WM_MBUTTONUP; CurInfo->ButtonsDown &= ~MK_MBUTTON; + Msg.wParam |= CurInfo->ButtonsDown; MsqInsertSystemMessage(&Msg); } if(mi->dwFlags & MOUSEEVENTF_RIGHTDOWN) @@ -1162,6 +1166,7 @@ gQueueKeyStateTable[VK_RBUTTON] |= 0xc0; Msg.message = SwapBtnMsg[0][!SwapButtons]; CurInfo->ButtonsDown |= SwapBtn[!SwapButtons]; + Msg.wParam |= CurInfo->ButtonsDown; MsqInsertSystemMessage(&Msg); } else if(mi->dwFlags & MOUSEEVENTF_RIGHTUP) @@ -1169,6 +1174,7 @@ gQueueKeyStateTable[VK_RBUTTON] &= ~0x80; Msg.message = SwapBtnMsg[1][!SwapButtons]; CurInfo->ButtonsDown &= ~SwapBtn[!SwapButtons]; + Msg.wParam |= CurInfo->ButtonsDown; MsqInsertSystemMessage(&Msg); }
@@ -1185,15 +1191,15 @@ if(mi->mouseData & XBUTTON1) { gQueueKeyStateTable[VK_XBUTTON1] |= 0xc0; + CurInfo->ButtonsDown |= MK_XBUTTON1; Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON1); - CurInfo->ButtonsDown |= XBUTTON1; MsqInsertSystemMessage(&Msg); } if(mi->mouseData & XBUTTON2) { gQueueKeyStateTable[VK_XBUTTON2] |= 0xc0; + CurInfo->ButtonsDown |= MK_XBUTTON2; Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON2); - CurInfo->ButtonsDown |= XBUTTON2; MsqInsertSystemMessage(&Msg); } } @@ -1203,15 +1209,15 @@ if(mi->mouseData & XBUTTON1) { gQueueKeyStateTable[VK_XBUTTON1] &= ~0x80; + CurInfo->ButtonsDown &= ~MK_XBUTTON1; Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON1); - CurInfo->ButtonsDown &= ~XBUTTON1; MsqInsertSystemMessage(&Msg); } if(mi->mouseData & XBUTTON2) { gQueueKeyStateTable[VK_XBUTTON2] &= ~0x80; + CurInfo->ButtonsDown &= ~MK_XBUTTON2; Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON2); - CurInfo->ButtonsDown &= ~XBUTTON2; MsqInsertSystemMessage(&Msg); } }