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-changelog

[Xen-changelog] [linux-2.6.18-xen] Decode mouse event packet dz value an

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Decode mouse event packet dz value and passes it as a wheel event into
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Dec 2007 08:10:16 -0800
Delivery-date: Mon, 10 Dec 2007 08:11:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1197294767 0
# Node ID c3ff0b26f664b46a542505c98ea418b0268b516d
# Parent  7232a025140ffb2bc2d5df40d7fbec816c30a576
Decode mouse event packet dz value and passes it as a wheel event into
the input stream.

Signed-off-by: Pat Campbell <plc@xxxxxxxxxx>
---
 drivers/xen/fbfront/xenkbd.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff -r 7232a025140f -r c3ff0b26f664 drivers/xen/fbfront/xenkbd.c
--- a/drivers/xen/fbfront/xenkbd.c      Mon Dec 10 13:51:57 2007 +0000
+++ b/drivers/xen/fbfront/xenkbd.c      Mon Dec 10 13:52:47 2007 +0000
@@ -64,8 +64,13 @@ static irqreturn_t input_handler(int rq,
                dev = info->ptr;
                switch (event->type) {
                case XENKBD_TYPE_MOTION:
-                       input_report_rel(dev, REL_X, event->motion.rel_x);
-                       input_report_rel(dev, REL_Y, event->motion.rel_y);
+                       if ( event->motion.rel_z == 1 || event->motion.rel_z == 
-1 ) {
+                               input_report_rel(dev, REL_WHEEL, 0 - 
event->motion.rel_z);
+                       }           
+                       else {
+                               input_report_rel(dev, REL_X, 
event->motion.rel_x);
+                               input_report_rel(dev, REL_Y, 
event->motion.rel_y);
+                       }
                        break;
                case XENKBD_TYPE_KEY:
                        dev = NULL;
@@ -81,8 +86,13 @@ static irqreturn_t input_handler(int rq,
                                       event->key.keycode);
                        break;
                case XENKBD_TYPE_POS:
-                       input_report_abs(dev, ABS_X, event->pos.abs_x);
-                       input_report_abs(dev, ABS_Y, event->pos.abs_y);
+                       if ( event->pos.abs_z == 1 || event->pos.abs_z == -1 ) {
+                               input_report_rel(dev, REL_WHEEL, 0 - 
event->pos.abs_z);
+                       }
+                       else {
+                               input_report_abs(dev, ABS_X, event->pos.abs_x);
+                               input_report_abs(dev, ABS_Y, event->pos.abs_y);
+                       }
                        break;
                }
                if (dev)
@@ -152,7 +162,7 @@ int __devinit xenkbd_probe(struct xenbus
        ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
        for (i = BTN_LEFT; i <= BTN_TASK; i++)
                set_bit(i, ptr->keybit);
-       ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y);
+       ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL);
        input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
        input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Decode mouse event packet dz value and passes it as a wheel event into, Xen patchbot-linux-2.6.18-xen <=