Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99540
b: refs/heads/master
c: 6ba0e7b
h: refs/heads/master
v: v3
  • Loading branch information
Markus Armbruster authored and Thomas Gleixner committed May 27, 2008
1 parent 165e708 commit c0f5c03
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e124fe16ff24746d6de5a2ad685266d7bce0e08
refs/heads/master: 6ba0e7b36c7cc1745b3cbeda244d14edae3ad058
8 changes: 7 additions & 1 deletion trunk/drivers/input/xen-kbdfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ static irqreturn_t input_handler(int rq, void *dev_id)
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)
input_report_rel(dev, REL_WHEEL,
-event->motion.rel_z);
break;
case XENKBD_TYPE_KEY:
dev = NULL;
Expand All @@ -84,6 +87,9 @@ static irqreturn_t input_handler(int rq, void *dev_id)
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.rel_z)
input_report_rel(dev, REL_WHEEL,
-event->pos.rel_z);
break;
}
if (dev)
Expand Down Expand Up @@ -152,7 +158,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev,
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);

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/xen/interface/io/kbdif.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct xenkbd_motion {
uint8_t type; /* XENKBD_TYPE_MOTION */
int32_t rel_x; /* relative X motion */
int32_t rel_y; /* relative Y motion */
int32_t rel_z; /* relative Z motion (wheel) */
};

struct xenkbd_key {
Expand All @@ -61,6 +62,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 rel_z; /* relative Z motion (wheel) */
};

#define XENKBD_IN_EVENT_SIZE 40
Expand Down

0 comments on commit c0f5c03

Please sign in to comment.