Fix crash on activating a text area without a real keyboard
It will cause on following situation: * Enable weston-simple-im * It's also reproducible with IBus or Fcitx5 * Connect a mouse or a touch panel * Don't connect keyboad * Launch weston-editor and touch the text area It doesn't reproduce with weston-keyboard because it doesn't use grab_keyboard of input-method-context-v1. Signed-off-by: Takuro Ashie <ashie@clear-code.com>
This commit is contained in:
committed by
Marius Vlad
parent
7c12182576
commit
29d81c0d4a
@@ -676,6 +676,9 @@ input_method_context_grab_keyboard(struct wl_client *client,
|
|||||||
struct weston_seat *seat = context->input_method->seat;
|
struct weston_seat *seat = context->input_method->seat;
|
||||||
struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat);
|
struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat);
|
||||||
|
|
||||||
|
if (!keyboard)
|
||||||
|
return;
|
||||||
|
|
||||||
cr = wl_resource_create(client, &wl_keyboard_interface, 1, id);
|
cr = wl_resource_create(client, &wl_keyboard_interface, 1, id);
|
||||||
wl_resource_set_implementation(cr, NULL, context, unbind_keyboard);
|
wl_resource_set_implementation(cr, NULL, context, unbind_keyboard);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user