From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: James Song <jsong@novell.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Mouse stops responding when wheel is used in Windows VM
Date: Fri, 20 Mar 2009 10:37:50 +0000 [thread overview]
Message-ID: <49C371FE.90301@eu.citrix.com> (raw)
In-Reply-To: <49C3D96B020000200000FF9F@lucius.provo.novell.com>
James Song wrote:
> 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/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 = &s->queue[s->head];
>
> dz = int_clamp(e->dz, -127, 127);
> + if(dz)
> + e->dz = 0;
>
> if (s->xyrel) {
> dx = int_clamp(e->xdx, -127, 127);
> @@ -593,7 +595,6 @@
>
> case USB_TABLET:
> /* Appears we have to invert the wheel direction */
> - dz = 0 - dz;
>
> buf[0] = b;
> buf[1] = dx & 0xff;
>
This patch (or a very similar one) seems to be already in the tree:
commit 70543c9952d2ff9f6fddb0a0948218e8e6f2dacb
Author: Ian Jackson <ian.jackson@eu.citrix.com>
Date: Thu Dec 11 18:04:47 2008 +0000
usb-hid.c: fix usb mouse wheel
This patch fixes the usb mouse wheel of usb devices.
[ Previously, tablets would fail to subtract dz from e->dz thus
producing an infinite stream of reports; also the wheel direction
inversions had been multipled by merge damage resulting in the wrong
number of inversions for mice. -iwj ]
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
prev parent reply other threads:[~2009-03-20 10:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 6:59 Mouse stops responding when wheel is used in Windows VM James Song
2009-03-20 10:37 ` Stefano Stabellini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49C371FE.90301@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=jsong@novell.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.