mirror of
https://github.com/rustdesk/qemu-display.git
synced 2026-10-27 14:40:04 +00:00
qd: rename Introspect->Display
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
1 parent
848cd7af0a
commit
458d9887d5
3 files changed
+11
-9
No files matched your search
@@ -2,7 +2,7 @@ use gio::ApplicationFlags;
|
||||
use glib::{clone, MainContext};
|
||||
use gtk::{gio, glib, prelude::*};
|
||||
use once_cell::sync::OnceCell;
|
||||
use qemu_display::{Chardev, Console, Introspect};
|
||||
use qemu_display::{Chardev, Console, Display};
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::os::unix::net::UnixStream;
|
||||
use zbus::Connection;
|
||||
@@ -33,13 +33,15 @@ fn main() {
|
||||
let audio_clone = audio.clone();
|
||||
let clipboard_clone = clipboard.clone();
|
||||
MainContext::default().spawn_local(clone!(@strong window => async move {
|
||||
let intro = Introspect::new(&conn).await.unwrap();
|
||||
let display = Display::new(&conn).await.unwrap();
|
||||
|
||||
let console = Console::new(&conn, 0).await.expect("Failed to get the QEMU console");
|
||||
let display = display_qemu::DisplayQemu::new(console);
|
||||
window.set_child(Some(&display));
|
||||
let rdw = display_qemu::DisplayQemu::new(console);
|
||||
window.set_child(Some(&rdw));
|
||||
|
||||
if let Ok(Some(audio)) = intro.audio().await {
|
||||
let usbredir = display.usbredir().await;
|
||||
|
||||
if let Ok(Some(audio)) = display.audio().await {
|
||||
match audio::Handler::new(audio).await {
|
||||
Ok(handler) => audio_clone.set(handler).unwrap(),
|
||||
Err(e) => log::warn!("Failed to setup audio: {}", e),
|
||||
|
||||
Reference in new issue
Block a user