Fail loudly when xkb_state is NULL in handle_keyboard_key
Warn and drop the event rather than silently swallowing it. This makes the root cause visible — key events arriving before keyboard is fully initialized.
This commit is contained in:
parent
4e9043ad6d
commit
df7f681c14
|
|
@ -1651,8 +1651,8 @@ handle_keyboard_key(struct wl_listener *listener, void *data)
|
|||
if (ev.u.key.utf8_len >= (int)sizeof(ev.u.key.utf8))
|
||||
ev.u.key.utf8_len = 0;
|
||||
} else {
|
||||
ev.u.key.keysym = 0;
|
||||
ev.u.key.utf8_len = 0;
|
||||
wwarning("handle_keyboard_key: kb->xkb_state is NULL, dropping key event (keycode=%u)", keycode);
|
||||
return;
|
||||
}
|
||||
|
||||
W_WL_EnqueueEvent(wmscr, &ev, NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue