mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
- MouseThreadMain: Send IOCTL_MOUSE_QUERY_ATTRIBUTES to mouse driver. MSDN reads that this IOCTL is sent from the subsystem. Filter drivers can depend on this behavior. (VirtualBox guest addition drivers)
Does the subsystem need the returned mouse attributes for anything? - ProcessMouseInputData: Handle flag MOUSE_MOVE_ABSOLUTE and change absolute mouse position to screen coordinates. Fixes VirtualBox mouse integration. svn path=/trunk/; revision=41166
This commit is contained in:
parent
cabc0627ac
commit
80a1ad6299
1 changed files with 24 additions and 0 deletions
|
@ -135,6 +135,15 @@ ProcessMouseInputData(PMOUSE_INPUT_DATA Data, ULONG InputCount)
|
|||
mi.dx += mid->LastX;
|
||||
mi.dy += mid->LastY;
|
||||
|
||||
/* Check if the mouse move is absolute */
|
||||
if (mid->Flags == MOUSE_MOVE_ABSOLUTE)
|
||||
{
|
||||
/* Set flag and convert to screen location */
|
||||
mi.dwFlags |= MOUSEEVENTF_ABSOLUTE;
|
||||
mi.dx = mi.dx / (65535 / UserGetSystemMetrics(SM_CXVIRTUALSCREEN));
|
||||
mi.dy = mi.dy / (65535 / UserGetSystemMetrics(SM_CYVIRTUALSCREEN));
|
||||
}
|
||||
|
||||
if(mid->ButtonFlags)
|
||||
{
|
||||
if(mid->ButtonFlags & MOUSE_LEFT_BUTTON_DOWN)
|
||||
|
@ -213,6 +222,7 @@ MouseThreadMain(PVOID StartContext)
|
|||
OBJECT_ATTRIBUTES MouseObjectAttributes;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
NTSTATUS Status;
|
||||
MOUSE_ATTRIBUTES MouseAttr;
|
||||
|
||||
InitializeObjectAttributes(&MouseObjectAttributes,
|
||||
&MouseDeviceName,
|
||||
|
@ -250,6 +260,20 @@ MouseThreadMain(PVOID StartContext)
|
|||
NULL);
|
||||
DPRINT("Mouse Input Thread Starting...\n");
|
||||
|
||||
/*FIXME: Does mouse attributes need to be used for anything */
|
||||
Status = NtDeviceIoControlFile(MouseDeviceHandle,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&Iosb,
|
||||
IOCTL_MOUSE_QUERY_ATTRIBUTES,
|
||||
&MouseAttr, sizeof(MOUSE_ATTRIBUTES),
|
||||
NULL, 0);
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("Failed to get mouse attributes\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Receive and process mouse input.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue