qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3] ui: add an embedded Barrier client


From: Anthony PERARD
Subject: Re: [Qemu-devel] [PATCH v3] ui: add an embedded Barrier client
Date: Mon, 23 Sep 2019 17:07:51 +0100
User-agent: Mutt/1.12.2 (2019-09-21)

Hi,

Once this patch is applied, if we try to start QEMU with "-k en-us",
qemu print a message and exit:
    qemu-system-i386: could not read keymap file: 'en-us'

See below,

On Fri, Sep 06, 2019 at 10:38:12AM +0200, Laurent Vivier wrote:
> diff --git a/ui/input-barrier.c b/ui/input-barrier.c
> new file mode 100644
> index 000000000000..a2c961f285a4
> --- /dev/null
> +++ b/ui/input-barrier.c
> +static void input_barrier_class_init(ObjectClass *oc, void *data)
> +{
> +    UserCreatableClass *ucc = USER_CREATABLE_CLASS(oc);
> +
> +    ucc->complete = input_barrier_complete;
> +
> +    /* always use generic keymaps */
> +    if (keyboard_layout) {
> +        /* We use X11 key id, so use VNC name2keysym */
> +        kbd_layout = init_keyboard_layout(name2keysym, keyboard_layout,
> +                                          &error_fatal);

I think it's because this function is called way to early, before
qemu_add_data_dir() is called, and so qemu_find_file() fails.

Can you fix it?

Thanks.

> +    }
> +}
> +
> +static const TypeInfo input_barrier_info = {
> +    .name = TYPE_INPUT_BARRIER,
> +    .parent = TYPE_OBJECT,
> +    .class_size = sizeof(InputBarrierClass),
> +    .class_init = input_barrier_class_init,
> +    .instance_size = sizeof(InputBarrier),
> +    .instance_init = input_barrier_instance_init,
> +    .instance_finalize = input_barrier_instance_finalize,
> +    .interfaces = (InterfaceInfo[]) {
> +        { TYPE_USER_CREATABLE },
> +        { }
> +    }
> +};
> +
> +static void register_types(void)
> +{
> +    type_register_static(&input_barrier_info);
> +}
> +
> +type_init(register_types);

-- 
Anthony PERARD



reply via email to

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