wayland: fix enigo crash & mid commit

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-10-13 06:34:50 -07:00
parent 3c9ac9e4d7
commit 5ddb10366e
7 changed files with 65 additions and 32 deletions

View File

@@ -190,7 +190,8 @@ pub async fn set_uinput() -> ResultType<()> {
let mouse = super::uinput::client::UInputMouse::new().await?;
log::info!("UInput mouse created");
let mut en = ENIGO.lock().unwrap();
let xxx = ENIGO.lock();
let mut en = xxx.unwrap();
en.set_uinput_keyboard(Some(Box::new(keyboard)));
en.set_uinput_mouse(Some(Box::new(mouse)));
Ok(())