From: "James Song" Subject: Mouse stops responding when wheel is used in Windows VM Date: Fri, 20 Mar 2009 00:59:07 -0600 Message-ID: <49C3D96B020000200000FF9F@lucius.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1509085478==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --===============1509085478== Content-Type: multipart/alternative; boundary="=__Part775FF0AB.0__=" This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part775FF0AB.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable I have found that when I attempt to use the wheel to scroll in a Windows = VM, the mouse becomes unresponsive for several moments. It appears as though during that time, the wheel scroll events are still being passed into the guest. =20 =20 patch to fix it: =20 diff -r 2d7858d7c9f4 tools/ioemu-remote/hw/usb-hid.c --- a/tools/ioemu-remote/hw/usb-hid.c Wed Feb 04 14:58:01 2009 +0800 +++ b/tools/ioemu-remote/hw/usb-hid.c Fri Feb 20 11:13:38 2009 +0800 @@ -551,6 +551,8 @@ e =3D &s->queue[s->head]; =20 dz =3D int_clamp(e->dz, -127, 127); + if(dz) + e->dz =3D 0; =20 if (s->xyrel) { dx =3D int_clamp(e->xdx, -127, 127); @@ -593,7 +595,6 @@ =20 case USB_TABLET: /* Appears we have to invert the wheel direction */ - dz =3D 0 - dz; =20 buf[0] =3D b; buf[1] =3D dx & 0xff; =20 =20 =20 --James Song ( Song Wei ) --=__Part775FF0AB.0__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
I have found that when I attempt to use the wheel to scroll in a = Windows VM,
the mouse becomes unresponsive for several moments.  = It appears as though
during that time, the wheel scroll events are = still being passed into the
guest.
 
 
patch to fix it:
 
diff -r 2d7858d7c9f4 tools/ioemu-remote/hw/usb-hid.c
--- a/tools/io= emu-remote/hw/usb-hid.c Wed Feb 04 14:58:01 2009 +0800
+++ = b/tools/ioemu-remote/hw/usb-hid.c Fri Feb 20 11:13:38 2009 +0800
@@= -551,6 +551,8 @@
     e =3D &s->queue[s->= head];
 
     dz =3D int_clamp(e->dz, = -127, 127);
+    if(dz)
+     = ;   e->dz =3D 0;
 
     if = (s->xyrel) {
         dx =3D = int_clamp(e->xdx, -127, 127);
@@ -593,7 +595,6 @@
 
 =     case USB_TABLET:
  /* Appears we have to = invert the wheel direction */
- dz =3D 0 - dz;
 
 &= nbsp;buf[0] =3D b;
  buf[1] =3D dx & 0xff;
 
 
 
--James Song ( Song Wei )
--=__Part775FF0AB.0__=-- --===============1509085478== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1509085478==--