diff -r d4a3479e68ce tools/ioemu/hw/xenfb.c --- a/tools/ioemu/hw/xenfb.c Fri Dec 07 18:24:33 2007 +0000 +++ b/tools/ioemu/hw/xenfb.c Sat Dec 08 13:00:49 2007 -0700 @@ -592,7 +592,7 @@ static int xenfb_send_key(struct xenfb * } /* Send a relative mouse movement event */ -static int xenfb_send_motion(struct xenfb *xenfb, int rel_x, int rel_y) +static int xenfb_send_motion(struct xenfb *xenfb, int rel_x, int rel_y, int rel_z) { union xenkbd_in_event event; @@ -600,12 +600,13 @@ static int xenfb_send_motion(struct xenf event.type = XENKBD_TYPE_MOTION; event.motion.rel_x = rel_x; event.motion.rel_y = rel_y; + event.motion.rel_z = rel_z; return xenfb_kbd_event(xenfb, &event); } /* Send an absolute mouse movement event */ -static int xenfb_send_position(struct xenfb *xenfb, int abs_x, int abs_y) +static int xenfb_send_position(struct xenfb *xenfb, int abs_x, int abs_y, int abs_z) { union xenkbd_in_event event; @@ -613,6 +614,7 @@ static int xenfb_send_position(struct xe event.type = XENKBD_TYPE_POS; event.pos.abs_x = abs_x; event.pos.abs_y = abs_y; + event.pos.abs_z = abs_z; return xenfb_kbd_event(xenfb, &event); } @@ -1043,9 +1045,10 @@ static void xenfb_mouse_event(void *opaq if (xenfb->abs_pointer_wanted) xenfb_send_position(xenfb, dx * xenfb->ds->width / 0x7fff, - dy * xenfb->ds->height / 0x7fff); + dy * xenfb->ds->height / 0x7fff, + dz); else - xenfb_send_motion(xenfb, dx, dy); + xenfb_send_motion(xenfb, dx, dy, dz); for (i = 0 ; i < 8 ; i++) { int lastDown = xenfb->button_state & (1 << i); diff -r d4a3479e68ce xen/include/public/io/kbdif.h --- a/xen/include/public/io/kbdif.h Fri Dec 07 18:24:33 2007 +0000 +++ b/xen/include/public/io/kbdif.h Sat Dec 08 12:56:46 2007 -0700 @@ -50,6 +50,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 @@ -64,6 +65,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 abs_z; /* absolute Z position (wheel) */ }; #define XENKBD_IN_EVENT_SIZE 40