VirtualBox

Ticket #9321 (closed defect: duplicate)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: Kortex Owned by:
Priority: minor 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

VBox.log Download (63.4 KB) - added by Kortex 3 years ago.

Change History

Changed 3 years ago by Kortex

comment:1 Changed 3 years ago by michael

  • Status changed from new to closed
  • Resolution set to duplicate
  • Summary changed from PutMouseEventAbsolute function produces a click with -2 offset on each coordinate to PutMouseEventAbsolute 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.

www.oracle.com
ContactPrivacy policyTerms of Use