[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] fbfront: Slightly streamline handling of wheel (z-axis) mouse events.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |