seat: don't send keymap on empty device

This commit is contained in:
Vaxry 2024-06-02 18:38:36 +02:00
parent 0ebb43c1a3
commit 66acdfe2ad
1 changed files with 3 additions and 0 deletions

View File

@ -213,6 +213,9 @@ bool CWLKeyboardResource::good() {
}
void CWLKeyboardResource::sendKeymap(SP<IKeyboard> keyboard) {
if (!keyboard)
return;
wl_keyboard_keymap_format format = keyboard ? WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 : WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP;
int fd;
uint32_t size;