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
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);
}