mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
refactor: adjust windows file layout
Signed-off-by: cailue <cailue@bupt.edu.cn>
This commit is contained in:
@@ -16,7 +16,7 @@ use crate::ipc::Connection;
|
||||
#[cfg(not(any(target_os = "ios")))]
|
||||
use crate::ipc::{self, Data};
|
||||
#[cfg(windows)]
|
||||
use clipboard::{cliprdr::CliprdrClientContext, empty_clipboard, ContextSend};
|
||||
use clipboard::ContextSend;
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use hbb_common::tokio::sync::mpsc::unbounded_channel;
|
||||
#[cfg(windows)]
|
||||
@@ -34,6 +34,7 @@ use hbb_common::{
|
||||
sync::mpsc::{self, UnboundedSender},
|
||||
task::spawn_blocking,
|
||||
},
|
||||
ResultType,
|
||||
};
|
||||
use serde_derive::Serialize;
|
||||
|
||||
@@ -175,9 +176,9 @@ impl<T: InvokeUiCM> ConnectionManager<T> {
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
ContextSend::proc(|context: &mut Box<CliprdrClientContext>| -> u32 {
|
||||
empty_clipboard(context, id);
|
||||
0
|
||||
let _ = ContextSend::proc(|context| -> ResultType<()> {
|
||||
context.empty_clipboard(id);
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
||||
@@ -414,8 +415,9 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
|
||||
ContextSend::set_is_stopped();
|
||||
} else {
|
||||
let conn_id = self.conn_id;
|
||||
ContextSend::proc(|context: &mut Box<CliprdrClientContext>| -> u32 {
|
||||
clipboard::server_clip_file(context, conn_id, _clip)
|
||||
let _ = ContextSend::proc(|context| -> ResultType<()> {
|
||||
context.server_clip_file(conn_id, _clip)
|
||||
.map_err(|e| e.into())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user