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] [xen-unstable] ioemu: Include mouse dz in xenfb event pa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: Include mouse dz in xenfb event packet
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Dec 2007 08:10:13 -0800
Delivery-date: Mon, 10 Dec 2007 08:10:53 -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 1197294562 0
# Node ID 4054cd60895b667eb349221effb678bb5244042e
# Parent  d9cd502d8df23566884bbb47376b67c47e4395a7
ioemu: Include mouse dz in xenfb event packet

Needed for mouse wheel support in a PV guest.

Signed-off-by: Pat Campbell <plc@xxxxxxxxxx>
---
 tools/ioemu/hw/xenfb.c        |   11 +++++++----
 xen/include/public/io/kbdif.h |    2 ++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff -r d9cd502d8df2 -r 4054cd60895b tools/ioemu/hw/xenfb.c
--- a/tools/ioemu/hw/xenfb.c    Mon Dec 10 12:02:46 2007 +0000
+++ b/tools/ioemu/hw/xenfb.c    Mon Dec 10 13:49:22 2007 +0000
@@ -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 d9cd502d8df2 -r 4054cd60895b xen/include/public/io/kbdif.h
--- a/xen/include/public/io/kbdif.h     Mon Dec 10 12:02:46 2007 +0000
+++ b/xen/include/public/io/kbdif.h     Mon Dec 10 13:49:22 2007 +0000
@@ -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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ioemu: Include mouse dz in xenfb event packet, Xen patchbot-unstable <=