<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Michael,</DIV>
<DIV> </DIV>
<DIV>Thanks, I also studied a bit more on the mouse filter driver for Windows.</DIV>
<DIV> </DIV>
<DIV>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? </DIV>
<DIV> </DIV>
<DIV>- huihong<BR><BR>--- On <B>Fri, 9/2/11, Michael Thayer <I><michael.thayer@oracle.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>From: Michael Thayer <michael.thayer@oracle.com><BR>Subject: Re: [vbox-dev] mouse integration concept level overview?<BR>To: "Huihong Luo" <huisinro@yahoo.com><BR>Cc: vbox-dev@virtualbox.org<BR>Date: Friday, September 2, 2011, 1:47 PM<BR><BR>
<DIV class=plainMail>Hello Huihong,<BR><BR>On Thu, 2011-09-01 at 20:56 -0700, Huihong Luo wrote:<BR>> 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.<BR>>  <BR>> 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.<BR>> _______________________________________________ vbox-dev mailing list <A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</A> <A
 href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR><BR>I'm afraid that this will be a quick-ish explanation for now.  When<BR>absolute pointer reporting is enabled (see the VMMDevReq_GetMouseStatus<BR>VMM device request) the current pointer position can be requested with<BR>the VMMDevReqMousePointer request.  This is reported as a percentage of<BR>the width and height (respectively) of the guest screen - expressed as a<BR>value from 0 to 0xFFFF - or of the virtual desktop for multi-monitor<BR>guests.  The host works out what percentage values correspond to the<BR>position of the host pointer relative to the host window the machine is<BR>running in, and the Additions report the position back to the guest in a<BR>way that the guest OS can convert to the correct pixel offset.  The host<BR>sends a VMM device event (basically an interrupt and a data word)
 when<BR>absolute reporting is enabled or disabled and when new position data is<BR>available.<BR><BR>Hope that helps a bit.<BR><BR>Regards,<BR><BR>Michael<BR>-- <BR>ORACLE Deutschland B.V. & Co. KG   Michael Thayer<BR>Werkstrasse 24                     VirtualBox engineering<BR>71384 Weinstadt, Germany           mailto:<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=michael.thayer@oracle.com" ymailto="mailto:michael.thayer@oracle.com">michael.thayer@oracle.com</A><BR><BR>Hauptverwaltung: Riesstr. 25, D-80992 München<BR>Registergericht: Amtsgericht München, HRA 95603<BR><BR>Komplementärin: ORACLE Deutschland Verwaltung B.V.<BR>Hertogswetering 163/167, 3543 AS Utrecht, Niederlande<BR>Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697<BR>Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der
 Ven<BR><BR></DIV></BLOCKQUOTE></td></tr></table>