Fix uinput server in wayland clien
This commit is contained in:
parent
7c2f26eab2
commit
7a1b1d87e9
@ -154,7 +154,20 @@ impl Client {
|
|||||||
return Err(err);
|
return Err(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(x) => Ok(x),
|
Ok(x) => {
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
if !*IS_X11.lock().unwrap() {
|
||||||
|
let keyboard = super::uinput::client::UInputKeyboard::new().await?;
|
||||||
|
log::info!("UInput keyboard created");
|
||||||
|
let mouse = super::uinput::client::UInputMouse::new().await?;
|
||||||
|
log::info!("UInput mouse created");
|
||||||
|
|
||||||
|
let mut en = ENIGO.lock().unwrap();
|
||||||
|
en.set_uinput_keyboard(Some(Box::new(keyboard)));
|
||||||
|
en.set_uinput_mouse(Some(Box::new(mouse)));
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(x)},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user