Wth is that, that is the most anti-idiomatic code I have ever seen
https://github.com/rustdesk/rustdesk/blob/master/src%2Fplatform%2Flinux.rs#L176
pub fn get_cursor() -> ResultType<Option<u64>> {
let mut res = None;
DISPLAY.with(|conn| {
if let Ok(d) = conn.try_borrow_mut() {
if !d.is_null() {
unsafe {
let img = XFixesGetCursorImage(*d);
if !img.is_null() {
res = Some((*img).cursor_serial as u64);
XFree(img as _);
}
}
}
}
});
Ok(res)
}
I’m not an expert but this seems wrong.
Use Remmina on the client and then install anything that opens and listens to VNC ports. For example TightVNC or RealVNC.
Just even a small sys admin tip for Android phones