ia64/linux-2.6.18-xen.hg

changeset 454:57dfe0098000

xenkbd: Fix z-axis mouse-wheel event reporting.
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 13:08:14 2008 +0000 (2008-02-28)
parents 10f6aed62763
children 87721beab1b9
files drivers/xen/fbfront/xenkbd.c include/xen/interface/io/kbdif.h
line diff
     1.1 --- a/drivers/xen/fbfront/xenkbd.c	Thu Feb 28 10:55:58 2008 +0000
     1.2 +++ b/drivers/xen/fbfront/xenkbd.c	Thu Feb 28 13:08:14 2008 +0000
     1.3 @@ -66,7 +66,7 @@ static irqreturn_t input_handler(int rq,
     1.4  		case XENKBD_TYPE_MOTION:
     1.5  			if (event->motion.rel_z)
     1.6  				input_report_rel(dev, REL_WHEEL,
     1.7 -						 0 - event->motion.rel_z);
     1.8 +						 -event->motion.rel_z);
     1.9  			input_report_rel(dev, REL_X, event->motion.rel_x);
    1.10  			input_report_rel(dev, REL_Y, event->motion.rel_y);
    1.11  			break;
    1.12 @@ -84,9 +84,9 @@ static irqreturn_t input_handler(int rq,
    1.13  				       event->key.keycode);
    1.14  			break;
    1.15  		case XENKBD_TYPE_POS:
    1.16 -			if (event->pos.abs_z)
    1.17 +			if (event->pos.rel_z)
    1.18  				input_report_rel(dev, REL_WHEEL,
    1.19 -						 0 - event->pos.abs_z);
    1.20 +						 -event->pos.rel_z);
    1.21  			input_report_abs(dev, ABS_X, event->pos.abs_x);
    1.22  			input_report_abs(dev, ABS_Y, event->pos.abs_y);
    1.23  			break;
     2.1 --- a/include/xen/interface/io/kbdif.h	Thu Feb 28 10:55:58 2008 +0000
     2.2 +++ b/include/xen/interface/io/kbdif.h	Thu Feb 28 13:08:14 2008 +0000
     2.3 @@ -65,7 +65,7 @@ struct xenkbd_position
     2.4      uint8_t type;        /* XENKBD_TYPE_POS */
     2.5      int32_t abs_x;       /* absolute X position (in FB pixels) */
     2.6      int32_t abs_y;       /* absolute Y position (in FB pixels) */
     2.7 -    int32_t abs_z;       /* absolute Z position (wheel) */
     2.8 +    int32_t rel_z;       /* relative Z motion (wheel) */
     2.9  };
    2.10  
    2.11  #define XENKBD_IN_EVENT_SIZE 40