Update leds when devices are added
This fixes #1104 LEDs on keyboard will now update to match the compositor state when they're plugged in.
This commit is contained in:
parent
68b6156aa8
commit
e5263bbad8
2 changed files with 10 additions and 3 deletions
|
|
@ -171,7 +171,8 @@ impl State {
|
|||
InputEvent::DeviceAdded { device } => {
|
||||
let shell = self.common.shell.read().unwrap();
|
||||
let seat = shell.seats.last_active();
|
||||
seat.devices().add_device(&device);
|
||||
let led_state = seat.get_keyboard().unwrap().led_state();
|
||||
seat.devices().add_device(&device, led_state);
|
||||
if device.has_capability(DeviceCapability::TabletTool) {
|
||||
seat.tablet_seat().add_tablet::<Self>(
|
||||
&self.common.display_handle,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue