move clipboard in common.rs to clipboard.rs

This commit is contained in:
rustdesk
2024-07-01 02:14:58 +08:00
parent 14343e89d4
commit e71d86c124
7 changed files with 432 additions and 447 deletions

View File

@@ -1,5 +1,5 @@
use super::*;
pub use crate::common::{
pub use crate::clipboard::{
check_clipboard, ClipboardContext, CLIPBOARD_INTERVAL as INTERVAL, CLIPBOARD_NAME as NAME,
CONTENT,
};
@@ -38,7 +38,7 @@ fn run(sp: EmptyExtraFieldService, state: &mut State) -> ResultType<()> {
sp.send(msg);
}
sp.snapshot(|sps| {
let data = crate::CONTENT.lock().unwrap().clone();
let data = CONTENT.lock().unwrap().clone();
if !data.is_empty() {
let msg_out = data.create_msg();
sps.send_shared(Arc::new(msg_out));

View File

@@ -2,7 +2,7 @@ use super::{input_service::*, *};
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
use crate::clipboard_file::*;
#[cfg(not(any(target_os = "android", target_os = "ios")))]
use crate::common::update_clipboard;
use crate::clipboard::update_clipboard;
#[cfg(target_os = "android")]
use crate::keyboard::client::map_key_to_control_key;
#[cfg(target_os = "linux")]