user32: Support the MOUSEEVENTF_VIRTUALDESK flag in SendInput().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8bca1b29cd
commit
ac3e887e5d
|
@ -140,10 +140,19 @@ static void update_mouse_coords( INPUT *input )
|
||||||
if (!(input->u.mi.dwFlags & MOUSEEVENTF_MOVE)) return;
|
if (!(input->u.mi.dwFlags & MOUSEEVENTF_MOVE)) return;
|
||||||
|
|
||||||
if (input->u.mi.dwFlags & MOUSEEVENTF_ABSOLUTE)
|
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.dx = (input->u.mi.dx * GetSystemMetrics( SM_CXSCREEN )) >> 16;
|
||||||
input->u.mi.dy = (input->u.mi.dy * GetSystemMetrics( SM_CYSCREEN )) >> 16;
|
input->u.mi.dy = (input->u.mi.dy * GetSystemMetrics( SM_CYSCREEN )) >> 16;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int accel[3];
|
int accel[3];
|
||||||
|
|
Loading…
Reference in New Issue