mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[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. svn path=/trunk/; revision=47080
This commit is contained in:
parent
2d25ad0d85
commit
d94aa6cafd
1 changed files with 11 additions and 5 deletions
|
@ -1111,7 +1111,7 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
/*
|
||||
* 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 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
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 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
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 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
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 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
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 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
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 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
gQueueKeyStateTable[VK_RBUTTON] &= ~0x80;
|
||||
Msg.message = SwapBtnMsg[1][!SwapButtons];
|
||||
CurInfo->ButtonsDown &= ~SwapBtn[!SwapButtons];
|
||||
Msg.wParam |= CurInfo->ButtonsDown;
|
||||
MsqInsertSystemMessage(&Msg);
|
||||
}
|
||||
|
||||
|
@ -1185,15 +1191,15 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
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 @@ IntMouseInput(MOUSEINPUT *mi)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue