Author: mjmartin
Date: Thu May 28 07:47:41 2009
New Revision: 41166
URL:
http://svn.reactos.org/svn/reactos?rev=41166&view=rev
Log:
- 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.
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/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] Thu May 28 07:47:41
2009
@@ -135,6 +135,15 @@
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 @@
OBJECT_ATTRIBUTES MouseObjectAttributes;
IO_STATUS_BLOCK Iosb;
NTSTATUS Status;
+ MOUSE_ATTRIBUTES MouseAttr;
InitializeObjectAttributes(&MouseObjectAttributes,
&MouseDeviceName,
@@ -249,6 +259,20 @@
TRUE,
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.