mirror of
https://gitlab.com/marcandre.lureau/qemu-display.git
synced 2025-01-30 15:25:15 +00:00
qemu-display: add missing Disable stubs
The display should learn to do something sensible, like write some text? Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
e5748eb17d
commit
b659c5ff84
@ -128,6 +128,8 @@ pub trait ConsoleListenerHandler: 'static + Send + Sync {
|
||||
#[cfg(unix)]
|
||||
async fn update_dmabuf(&mut self, update: UpdateDMABUF);
|
||||
|
||||
async fn disable(&mut self);
|
||||
|
||||
async fn mouse_set(&mut self, set: MouseSet);
|
||||
|
||||
async fn cursor_define(&mut self, cursor: Cursor);
|
||||
@ -296,6 +298,10 @@ impl<H: ConsoleListenerHandler> ConsoleListener<H> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn disable(&mut self) {
|
||||
self.handler.disable().await;
|
||||
}
|
||||
|
||||
async fn mouse_set(&mut self, x: i32, y: i32, on: i32) {
|
||||
self.handler.mouse_set(MouseSet { x, y, on }).await;
|
||||
}
|
||||
|
@ -266,6 +266,9 @@ mod imp {
|
||||
this.obj().render();
|
||||
let _ = wait_tx.send(());
|
||||
}
|
||||
Disable => {
|
||||
log::warn!("Display disabled");
|
||||
}
|
||||
Disconnected => {
|
||||
log::warn!("Console disconnected");
|
||||
}
|
||||
@ -340,6 +343,7 @@ enum ConsoleEvent {
|
||||
_update: qemu_display::UpdateDMABUF,
|
||||
wait_tx: futures::channel::oneshot::Sender<()>,
|
||||
},
|
||||
Disable,
|
||||
MouseSet(qemu_display::MouseSet),
|
||||
CursorDefine(qemu_display::Cursor),
|
||||
Disconnected,
|
||||
@ -391,6 +395,10 @@ impl ConsoleListenerHandler for ConsoleHandler {
|
||||
}
|
||||
}
|
||||
|
||||
async fn disable(&mut self) {
|
||||
self.send(ConsoleEvent::Disable);
|
||||
}
|
||||
|
||||
async fn mouse_set(&mut self, set: qemu_display::MouseSet) {
|
||||
self.send(ConsoleEvent::MouseSet(set));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user