VirtualBox

Opened 13 years ago

Closed 13 years ago

#9321 closed defect (duplicate)

PutMouseEventAbsolute function produces a click with -2 offset on each coordinate -> duplicate of #7566

Reported by: Sergey Owned by:
Component: other Version: VirtualBox 4.1.0
Keywords: IMouse, PutMouseEventAbsolute Cc:
Guest type: other Host type: other

Description

I am using VirtualBox SDK to move/click mouse on guest from app running on host through IMouse interface. I've noticed that when I call PutMouseEventAbsolute(x, y, 0, 0, 1) the real click happens at (x-2,y-2) position.

GA are installed, but Mouse Integration is disabled for the guest.

I have created .NET wrapper for VirtualBox.exe with tlbimp tool.

My program looks like this:

/

VirtualBoxClass vbc = new VirtualBoxClass(); IMachine vm = vbc.FindMachine("w7");

SessionClass s = new SessionClass();

vm.LockMachine(s, LockType.LockType_Shared);

s.Console.Mouse.PutMouseEventAbsolute(100, 100, 0, 0, 1);

/

the click happens at (98,98)

Attachments (1)

VBox.log (63.4 KB ) - added by Sergey 13 years ago.

Download all attachments as: .zip

Change History (2)

by Sergey, 13 years ago

Attachment: VBox.log added

comment:1 by Michael Thayer, 13 years ago

Resolution: duplicate
Status: newclosed
Summary: PutMouseEventAbsolute function produces a click with -2 offset on each coordinatePutMouseEventAbsolute function produces a click with -2 offset on each coordinate -> duplicate of #7566

This ticket is a duplicate of #7566. Actually there is only a single pixel difference, as the API officially uses an origin of (1, 1) for reasons no one can remember. Which no one wants to change now.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use