[PATCH weston 09/10] keyboard: do not crash if no input panel is available
Pekka Paalanen
ppaalanen at gmail.com
Thu Aug 28 03:59:02 PDT 2014
On Mon, 25 Aug 2014 20:56:51 +0200
rawoul at gmail.com wrote:
> From: Arnaud Vrac <avrac at freebox.fr>
>
> ---
> clients/keyboard.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/clients/keyboard.c b/clients/keyboard.c
> index 7c11cec..750f58e 100644
> --- a/clients/keyboard.c
> +++ b/clients/keyboard.c
> @@ -969,6 +969,8 @@ keyboard_create(struct output *output, struct virtual_keyboard *virtual_keyboard
> layout->columns * key_width,
> layout->rows * key_height);
>
> + if (!virtual_keyboard->input_panel)
> + return;
>
> ips = wl_input_panel_get_input_panel_surface(virtual_keyboard->input_panel,
> window_get_wl_surface(keyboard->window));
How do you trigger this crash?
Also, is just silently returning really a good action?
Isn't this client useless without the input_panel?
What about virtual_keyboard->input_method?
Would it make sense to print an error and exit with failure if either
of input_panel or input_method are missing?
Thanks,
pq
More information about the wayland-devel
mailing list