qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 1/2] Support for multiple keyboard devices


From: Juan Quintela
Subject: [Qemu-devel] Re: [PATCH 1/2] Support for multiple keyboard devices
Date: Wed, 31 Mar 2010 12:12:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Shahar Havivi <address@hidden> wrote:
> Currently you get segfault when trying to remove keyboard (device_del
> monitor command) because no keyboard handling is done.
>
> This patch add QEMUPutKbdEntry structure, handling each keyboard entry.
> Adding a keyboard add to the list, removing keyboard select the previous
> keyboard in list.

> diff --git a/hw/xenfb.c b/hw/xenfb.c
> index 422cd53..2c700bd 100644
> --- a/hw/xenfb.c
> +++ b/hw/xenfb.c
> @@ -373,7 +373,7 @@ static int input_connect(struct XenDevice *xendev)
>      if (rc != 0)
>       return rc;
>  
> -    qemu_add_kbd_event_handler(xenfb_key_event, in);
> +    qemu_add_kbd_event_handler(xenfb_key_event, in, "Xen Keyboard");
>      in->qmouse = qemu_add_mouse_event_handler(xenfb_mouse_event, in,
>                                             in->abs_pointer_wanted,
>                                             "Xen PVFB Mouse");
> @@ -388,7 +388,7 @@ static void input_disconnect(struct XenDevice *xendev)
>       qemu_remove_mouse_event_handler(in->qmouse);
>       in->qmouse = NULL;
>      }
> -    qemu_add_kbd_event_handler(NULL, NULL);
> +    qemu_add_kbd_event_handler(NULL, NULL, NULL);
>      common_unbind(&in->c);
>  }
>  

xen code changes with this patch.  You need to store the event handler
somewhere to be able to remove it later, no?

Later, Juan.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]