[PATCH weston 1/2] text backend should handle existing seats on init.
Pekka Paalanen
ppaalanen at gmail.com
Thu Jun 11 02:17:00 PDT 2015
On Wed, 10 Jun 2015 20:29:42 +0000
Murray Calavera <murray.calavera at gmail.com> wrote:
> Hello,
>
> New patches are here:
> http://patchwork.freedesktop.org/patch/51584
> http://patchwork.freedesktop.org/patch/51585
>
>
> > What was the crash exactly?
>
> The crash happens because the seat is assigned an input method as soon
> as the text backend is initialized.
>
> So If you try to call text_input_activate() before
> text_backend_seat_created(),
> it will try to get an input_method that doesent exist from the seat.
>
> In theory this should never happen now because without a seat,
> text_input_activate
> should never be called. And if there is a seat it will have an input_method
> if
> the global is advertised(thanks to this patch).
>
> Is it better to check if seat->input_method is null just in case?
>
> to reproduce the crash you can just apply the second patch without the
> first and use weston-editor to activate the input method.
Ok, thanks for the explanation.
I see text_input_activate() is a protocol handler that takes an
arbitrary wl_seat as an argument. If our policy in Weston is to always
init input method support either for all seats or not init at all, then
there's probably no reason to add a NULL check. There could be an
assert() if you want, but I'm fine with it as is.
That is what I wanted to understand.
Thanks,
pq
More information about the wayland-devel
mailing list