Commit ac3e887e authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Support the MOUSEEVENTF_VIRTUALDESK flag in SendInput().

parent 8bca1b29
......@@ -141,9 +141,18 @@ static void update_mouse_coords( INPUT *input )
if (input->u.mi.dwFlags & MOUSEEVENTF_ABSOLUTE)
{
if (input->u.mi.dwFlags & MOUSEEVENTF_VIRTUALDESK)
{
RECT rc = get_virtual_screen_rect();
input->u.mi.dx = rc.left + ((input->u.mi.dx * (rc.right - rc.left)) >> 16);
input->u.mi.dy = rc.top + ((input->u.mi.dy * (rc.bottom - rc.top)) >> 16);
}
else
{
input->u.mi.dx = (input->u.mi.dx * GetSystemMetrics( SM_CXSCREEN )) >> 16;
input->u.mi.dy = (input->u.mi.dy * GetSystemMetrics( SM_CYSCREEN )) >> 16;
}
}
else
{
int accel[3];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment