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

View file

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