[vbox-dev] mouse integration concept level overview?

Huihong Luo huisinro at yahoo.com
Fri Sep 2 23:54:44 GMT 2011


Michael,
 
Thanks, I also studied a bit more on the mouse filter driver for Windows.
 
In short, when integration mode is enabled, guest/host uses exactly the same mouse. When the mouse is in guest window (or guest virtual desktops), the guest gets notifications about the mouse pointers/positions/states, etc. When the mouse is out of guest window, the guest will no longer get any notifications, Is this correct? 
 
- huihong

--- On Fri, 9/2/11, Michael Thayer <michael.thayer at oracle.com> wrote:


From: Michael Thayer <michael.thayer at oracle.com>
Subject: Re: [vbox-dev] mouse integration concept level overview?
To: "Huihong Luo" <huisinro at yahoo.com>
Cc: vbox-dev at virtualbox.org
Date: Friday, September 2, 2011, 1:47 PM


Hello Huihong,

On Thu, 2011-09-01 at 20:56 -0700, Huihong Luo wrote:
> I need to know a bit more about the mouse integration. Can someone explain in big picture on what happened when a mouse pointer is moving from host to the guest? once the mouse inside the guest window, host informs the guest about the mouse positions? etc.
>  
> I need to get some ideas on this in order to implement the drag-and-drop feature for vbox. Right now, it's stuck when the mouse is dragged from host to vm, how the guest side knows about that. I need to press a key for now to tell the guest side, so the dnd isn't smooth yet. A good understanding on mouse integration would be very helpful.
> _______________________________________________ vbox-dev mailing list vbox-dev at virtualbox.org http://vbox.innotek.de/mailman/listinfo/vbox-dev

I'm afraid that this will be a quick-ish explanation for now.  When
absolute pointer reporting is enabled (see the VMMDevReq_GetMouseStatus
VMM device request) the current pointer position can be requested with
the VMMDevReqMousePointer request.  This is reported as a percentage of
the width and height (respectively) of the guest screen - expressed as a
value from 0 to 0xFFFF - or of the virtual desktop for multi-monitor
guests.  The host works out what percentage values correspond to the
position of the host pointer relative to the host window the machine is
running in, and the Additions report the position back to the guest in a
way that the guest OS can convert to the correct pixel offset.  The host
sends a VMM device event (basically an interrupt and a data word) when
absolute reporting is enabled or disabled and when new position data is
available.

Hope that helps a bit.

Regards,

Michael
-- 
ORACLE Deutschland B.V. & Co. KG   Michael Thayer
Werkstrasse 24                     VirtualBox engineering
71384 Weinstadt, Germany           mailto:michael.thayer at oracle.com

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20110902/ce6365fd/attachment.html>


More information about the vbox-dev mailing list