mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-30 23:48:00 +02:00
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:
parent
7c12182576
commit
29d81c0d4a
1 changed files with 3 additions and 0 deletions
|
|
@ -676,6 +676,9 @@ input_method_context_grab_keyboard(struct wl_client *client,
|
|||
struct weston_seat *seat = context->input_method->seat;
|
||||
struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat);
|
||||
|
||||
if (!keyboard)
|
||||
return;
|
||||
|
||||
cr = wl_resource_create(client, &wl_keyboard_interface, 1, id);
|
||||
wl_resource_set_implementation(cr, NULL, context, unbind_keyboard);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue