input: fix modifier and leds (#6062)

This commit is contained in:
Sungyoon Cho 2024-05-15 00:14:43 +09:00 committed by GitHub
parent 1584679004
commit d0a4a0e0d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 36 additions and 8 deletions

View file

@ -131,8 +131,17 @@ void IKeyboard::updateLEDs() {
leds |= (1 << i);
}
updateLEDs(leds);
}
void IKeyboard::updateLEDs(uint32_t leds) {
auto keyboard = wlr();
if (!keyboard || keyboard->xkb_state == nullptr)
return;
if (isVirtual() && g_pInputManager->shouldIgnoreVirtualKeyboard(self.lock()))
return;
wlr_keyboard_led_update(wlr(), leds);
wlr_keyboard_led_update(keyboard, leds);
}