backend: add syspath and devnode to input devices
This commit is contained in:
parent
813f87faaa
commit
283e438d1b
9 changed files with 107 additions and 64 deletions
|
|
@ -281,7 +281,7 @@ pub async fn create(state: &Rc<State>) -> Result<Rc<MetalBackend>, MetalError> {
|
|||
struct MetalInputDevice {
|
||||
slot: usize,
|
||||
id: InputDeviceId,
|
||||
_devnum: c::dev_t,
|
||||
devnum: c::dev_t,
|
||||
fd: CloneCell<Option<Rc<OwnedFd>>>,
|
||||
inputdev: CloneCell<Option<Rc<RegisteredDevice>>>,
|
||||
devnode: CString,
|
||||
|
|
@ -509,6 +509,10 @@ impl InputDevice for MetalInputDevice {
|
|||
self.name.get()
|
||||
}
|
||||
|
||||
fn dev_t(&self) -> Option<c::dev_t> {
|
||||
Some(self.devnum)
|
||||
}
|
||||
|
||||
fn set_tap_enabled(&self, enabled: bool) {
|
||||
self.desired.tap_enabled.set(Some(enabled));
|
||||
if let Some(dev) = self.inputdev.get() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue