[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] xenkbd: Fix z-axis mouse-wheel event reporting.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204204094 0
# Node ID 57dfe0098000827376671bf466df3e2b51382756
# Parent  10f6aed62763c5a9c515d6da2c05dce249620d9b
xenkbd: Fix z-axis mouse-wheel event reporting.
From: Markus Armbruster <armbru@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 drivers/xen/fbfront/xenkbd.c     |    6 +++---
 include/xen/interface/io/kbdif.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -r 10f6aed62763 -r 57dfe0098000 drivers/xen/fbfront/xenkbd.c
--- a/drivers/xen/fbfront/xenkbd.c      Thu Feb 28 10:55:58 2008 +0000
+++ b/drivers/xen/fbfront/xenkbd.c      Thu Feb 28 13:08:14 2008 +0000
@@ -66,7 +66,7 @@ static irqreturn_t input_handler(int rq,
                case XENKBD_TYPE_MOTION:
                        if (event->motion.rel_z)
                                input_report_rel(dev, REL_WHEEL,
-                                                0 - event->motion.rel_z);
+                                                -event->motion.rel_z);
                        input_report_rel(dev, REL_X, event->motion.rel_x);
                        input_report_rel(dev, REL_Y, event->motion.rel_y);
                        break;
@@ -84,9 +84,9 @@ static irqreturn_t input_handler(int rq,
                                       event->key.keycode);
                        break;
                case XENKBD_TYPE_POS:
-                       if (event->pos.abs_z)
+                       if (event->pos.rel_z)
                                input_report_rel(dev, REL_WHEEL,
-                                                0 - event->pos.abs_z);
+                                                -event->pos.rel_z);
                        input_report_abs(dev, ABS_X, event->pos.abs_x);
                        input_report_abs(dev, ABS_Y, event->pos.abs_y);
                        break;
diff -r 10f6aed62763 -r 57dfe0098000 include/xen/interface/io/kbdif.h
--- a/include/xen/interface/io/kbdif.h  Thu Feb 28 10:55:58 2008 +0000
+++ b/include/xen/interface/io/kbdif.h  Thu Feb 28 13:08:14 2008 +0000
@@ -65,7 +65,7 @@ struct xenkbd_position
     uint8_t type;        /* XENKBD_TYPE_POS */
     int32_t abs_x;       /* absolute X position (in FB pixels) */
     int32_t abs_y;       /* absolute Y position (in FB pixels) */
-    int32_t abs_z;       /* absolute Z position (wheel) */
+    int32_t rel_z;       /* relative Z motion (wheel) */
 };
 
 #define XENKBD_IN_EVENT_SIZE 40

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.