mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-15 18:54:07 +00:00
libinput-seat: update leds when a new device is added
Fix an issue where the keyboard leds will go out of sync when a new keyboard is connected. The issue can be easily reproduced by connecting two keyboards, enabling caps lock, and reconnecting one of the keyboards. Without the patch the leds on both keyboards will turn off while the actual caps lock state will stay enabled. Signed-off-by: Samu Nuutamo <samu.nuutamo@gmail.com>
This commit is contained in:
parent
497d03edbf
commit
58a2faf716
|
@ -135,8 +135,13 @@ device_added(struct udev_input *input, struct libinput_device *libinput_device)
|
|||
evdev_device_set_output(device, output);
|
||||
}
|
||||
|
||||
if (!input->suspended)
|
||||
if (!input->suspended) {
|
||||
weston_seat_repick(seat);
|
||||
|
||||
/* Sync device leds with the actual state */
|
||||
if (seat->led_update && seat->keyboard_state)
|
||||
seat->led_update(seat, seat->keyboard_state->xkb_state.leds);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue