input: add a default seat
This commit is contained in:
parent
8a73779cbd
commit
355a9eb240
10 changed files with 58 additions and 14 deletions
|
|
@ -6,6 +6,7 @@ use {
|
|||
tasks::udev_utils::{udev_props, UdevProps},
|
||||
utils::asyncevent::AsyncEvent,
|
||||
},
|
||||
jay_config::_private::DEFAULT_SEAT_NAME,
|
||||
std::{cell::Cell, rc::Rc},
|
||||
};
|
||||
|
||||
|
|
@ -53,6 +54,12 @@ impl DeviceHandler {
|
|||
let ae = self.ae.clone();
|
||||
self.dev.on_change(Rc::new(move || ae.trigger()));
|
||||
}
|
||||
for seat in self.state.globals.seats.lock().values() {
|
||||
if seat.seat_name() == DEFAULT_SEAT_NAME {
|
||||
self.data.seat.set(Some(seat.clone()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if let Some(config) = self.state.config.get() {
|
||||
config.new_input_device(self.dev.id());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue