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-devel

Re: [Xen-devel] [PATCH 2/2] Move the xenfb pointer handler to the connec

To: John Haxby <john.haxby@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/2] Move the xenfb pointer handler to the connected method
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 7 Jul 2010 17:41:06 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>
Delivery-date: Wed, 07 Jul 2010 09:42:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1278510002-20735-3-git-send-email-john.haxby@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1278510002-20735-1-git-send-email-john.haxby@xxxxxxxxxx> <1278510002-20735-3-git-send-email-john.haxby@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
CC'ing Gerd.

On Wed, 7 Jul 2010, John Haxby wrote:
> Ensure that we read "request-abs-pointer" after the frontend has written
> it.  This means that we will correctly set up an ansolute or relative
> pointer handler correctly.
> 
> Signed-off-by: John Haxby <john.haxby@xxxxxxxxxx>

Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

> ---
>  hw/xenfb.c |   19 ++++++++++++++-----
>  1 files changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/xenfb.c b/hw/xenfb.c
> index c96cfe6..29a873f 100644
> --- a/hw/xenfb.c
> +++ b/hw/xenfb.c
> @@ -366,19 +366,27 @@ static int input_initialise(struct XenDevice *xendev)
>      struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
>      int rc;
>  
> -    if (xenstore_read_fe_int(xendev, "request-abs-pointer",
> -                             &in->abs_pointer_wanted) == -1)
> -     in->abs_pointer_wanted = 0;
> -
>      rc = common_bind(&in->c);
>      if (rc != 0)
>       return rc;
>  
>      qemu_add_kbd_event_handler(xenfb_key_event, in);
> +    return 0;
> +}
> +
> +static void input_connected(struct XenDevice *xendev)
> +{
> +    struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
> +
> +    if (xenstore_read_fe_int(xendev, "request-abs-pointer",
> +                             &in->abs_pointer_wanted) == -1)
> +     in->abs_pointer_wanted = 0;
> +
> +    if (in->qmouse)
> +     qemu_remove_mouse_event_handler(in->qmouse);
>      in->qmouse = qemu_add_mouse_event_handler(xenfb_mouse_event, in,
>                                             in->abs_pointer_wanted,
>                                             "Xen PVFB Mouse");
> -    return 0;
>  }
>  
>  static void input_disconnect(struct XenDevice *xendev)
> @@ -958,6 +966,7 @@ struct XenDevOps xen_kbdmouse_ops = {
>      .size       = sizeof(struct XenInput),
>      .init       = input_init,
>      .initialise = input_initialise,
> +    .connected  = input_connected,
>      .disconnect = input_disconnect,
>      .event      = input_event,
>  };
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 

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