WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] ioemu: fix mouse wheel

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] ioemu: fix mouse wheel
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Thu, 11 Dec 2008 17:38:58 +0000
Delivery-date: Thu, 11 Dec 2008 09:39:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080505)
This patch fixes the usb mouse wheel of usb devices.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r 1dcac7c92479 hw/usb-hid.c
--- a/hw/usb-hid.c      Mon Nov 10 10:45:28 2008 +0000
+++ b/hw/usb-hid.c      Thu Dec 11 17:37:20 2008 +0000
@@ -568,6 +568,7 @@
 
     dz = int_clamp(e->dz, -128, 127);
 
+    e->dz -= dz;
     if (s->xyrel) {
         dx = int_clamp(e->xdx, -128, 127);
         dy = int_clamp(e->ydy, -128, 127);
@@ -585,9 +586,6 @@
        /* that deals with this event */
        QUEUE_INCR(s->head);
     }
-
-    /* Appears we have to invert the wheel direction */
-    dz = 0 - dz;
 
     b = 0;
     if (e->buttons_state & MOUSE_EVENT_LBUTTON)
@@ -611,9 +609,6 @@
        break;
 
     case USB_TABLET:
-       /* Appears we have to invert the wheel direction */
-       dz = 0 - dz;
-
        buf[0] = b;
        buf[1] = dx & 0xff;
        buf[2] = dx >> 8;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ioemu: fix mouse wheel, Stefano Stabellini <=