Hi Michael, I noted that Windows additions (vboxmouse.sys and VBoxMouseNT.sys) doesn't perform any conversion from this 0-FFFF percentange coordinates, however X11 additions convert them to screen resolution. Does Windows happen to use the same measurement of 0-0xFFFF ? Another thing is that the cursor shape at pointer disppears when moving out of vm guest window, does virtualbox perform some special task to make the curson not to appear? or the host simply reports some out of range positions to the guest. I was curious how this is handled. Thanks, - huihong
--- On Fri, 9/2/11, Michael Thayer <[email protected]> wrote: From: Michael Thayer <[email protected]> Subject: Re: [vbox-dev] mouse integration concept level overview? To: "Huihong Luo" <[email protected]> Cc: [email protected] 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 > [email protected] 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:[email protected] 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
_______________________________________________ vbox-dev mailing list [email protected] http://vbox.innotek.de/mailman/listinfo/vbox-dev
