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] fbfront: Slightly streamline handling

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] fbfront: Slightly streamline handling of wheel (z-axis) mouse events.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Feb 2008 08:40:11 -0800
Delivery-date: Mon, 25 Feb 2008 08:40:11 -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 1203930912 0
# Node ID 1edfea26a2a9d1b482f774fbf4cd113e7651ce3a
# Parent  be78655b9e879a9d83bfe58d95cfca952d99a09f
fbfront: Slightly streamline handling of wheel (z-axis) mouse events.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 drivers/xen/fbfront/xenkbd.c |   24 ++++++++++--------------
 1 files changed, 10 insertions(+), 14 deletions(-)

diff -r be78655b9e87 -r 1edfea26a2a9 drivers/xen/fbfront/xenkbd.c
--- a/drivers/xen/fbfront/xenkbd.c      Fri Feb 22 16:52:34 2008 +0000
+++ b/drivers/xen/fbfront/xenkbd.c      Mon Feb 25 09:15:12 2008 +0000
@@ -64,13 +64,11 @@ static irqreturn_t input_handler(int rq,
                dev = info->ptr;
                switch (event->type) {
                case XENKBD_TYPE_MOTION:
-                       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);
-                       }
+                       if (event->motion.rel_z)
+                               input_report_rel(dev, REL_WHEEL,
+                                                0 - 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;
                case XENKBD_TYPE_KEY:
                        dev = NULL;
@@ -86,13 +84,11 @@ static irqreturn_t input_handler(int rq,
                                       event->key.keycode);
                        break;
                case XENKBD_TYPE_POS:
-                       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);
-                       }
+                       if (event->pos.abs_z)
+                               input_report_rel(dev, REL_WHEEL,
+                                                0 - event->pos.abs_z);
+                       input_report_abs(dev, ABS_X, event->pos.abs_x);
+                       input_report_abs(dev, ABS_Y, event->pos.abs_y);
                        break;
                }
                if (dev)

_______________________________________________
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] fbfront: Slightly streamline handling of wheel (z-axis) mouse events., Xen patchbot-linux-2.6.18-xen <=