backends/native: Sync LEDs when adding new device

Adding new input devices resets the LED state, make sure to restore it
to keep the LED and XKB state consistent.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1594
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1662>
This commit is contained in:
Olivier Fourdan 2021-01-04 16:10:51 +01:00 committed by Marge Bot
parent 7e3fae0052
commit c016437857

View File

@ -1633,6 +1633,7 @@ evdev_add_device (MetaSeatImpl *seat_impl,
device = meta_input_device_native_new_in_impl (seat_impl, libinput_device); device = meta_input_device_native_new_in_impl (seat_impl, libinput_device);
seat_impl->devices = g_slist_prepend (seat_impl->devices, device); seat_impl->devices = g_slist_prepend (seat_impl->devices, device);
meta_seat_impl_sync_leds_in_impl (seat_impl);
/* Clutter assumes that device types are exclusive in the /* Clutter assumes that device types are exclusive in the
* ClutterInputDevice API */ * ClutterInputDevice API */