mirror of
https://gitlab.com/marcandre.lureau/qemu-display.git
synced 2024-11-10 01:50:00 +00:00
qemu-display: avoid sending absolute position if unsupported
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
d78a324502
commit
9fd90c70c8
@ -78,7 +78,12 @@ mod imp {
|
|||||||
.connect_motion(clone!(@weak self as this => move |_, x, y| {
|
.connect_motion(clone!(@weak self as this => move |_, x, y| {
|
||||||
log::debug!("motion: {:?}", (x, y));
|
log::debug!("motion: {:?}", (x, y));
|
||||||
MainContext::default().spawn_local(clone!(@weak this => async move {
|
MainContext::default().spawn_local(clone!(@weak this => async move {
|
||||||
let _ = this.obj().console().mouse.set_abs_position(x as _, y as _).await;
|
if !this.obj().console().mouse.is_absolute().await.unwrap_or(false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if let Err(e) = this.obj().console().mouse.set_abs_position(x as _, y as _).await {
|
||||||
|
log::warn!("{e}");
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user