mirror of
https://gitlab.com/marcandre.lureau/qemu-display.git
synced 2025-01-03 03:05:18 +00:00
rdp: fix Infaillible cast
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
32b4027d7c
commit
30184f9e6f
@ -6,8 +6,6 @@ use tokio::{
|
|||||||
task,
|
task,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::cast;
|
|
||||||
|
|
||||||
pub struct InputHandler {
|
pub struct InputHandler {
|
||||||
tx: Sender<InputEvent>,
|
tx: Sender<InputEvent>,
|
||||||
_task: task::JoinHandle<()>,
|
_task: task::JoinHandle<()>,
|
||||||
@ -54,7 +52,7 @@ async fn input_receive_task(mut rx: Receiver<InputEvent>, console: Console) {
|
|||||||
Some(InputEvent::Mouse(ev)) => match ev {
|
Some(InputEvent::Mouse(ev)) => match ev {
|
||||||
MouseEvent::Move { x, y } => {
|
MouseEvent::Move { x, y } => {
|
||||||
tracing::trace!(?x, ?y);
|
tracing::trace!(?x, ?y);
|
||||||
console.mouse.set_abs_position(cast!(x), cast!(y)).await
|
console.mouse.set_abs_position(x.into(), y.into()).await
|
||||||
}
|
}
|
||||||
MouseEvent::RightPressed => console.mouse.press(MouseButton::Right).await,
|
MouseEvent::RightPressed => console.mouse.press(MouseButton::Right).await,
|
||||||
MouseEvent::RightReleased => console.mouse.release(MouseButton::Right).await,
|
MouseEvent::RightReleased => console.mouse.release(MouseButton::Right).await,
|
||||||
|
Loading…
Reference in New Issue
Block a user