This commit is contained in:
rustdesk 2024-07-01 01:43:16 +08:00
parent cd73368cb9
commit 3f2dfa521c
2 changed files with 7 additions and 1 deletions

2
Cargo.lock generated

@ -974,7 +974,7 @@ dependencies = [
[[package]] [[package]]
name = "clipboard-master" name = "clipboard-master"
version = "4.0.0-beta.6" version = "4.0.0-beta.6"
source = "git+https://github.com/rustdesk-org/clipboard-master#38c0a5c0e5e0cab48abf1209900e3543487fc474" source = "git+https://github.com/rustdesk-org/clipboard-master#5268c7b3d7728699566ad863da0911f249706f8c"
dependencies = [ dependencies = [
"objc", "objc",
"objc-foundation", "objc-foundation",

@ -8,6 +8,7 @@ use std::{
task::Poll, task::Poll,
}; };
#[cfg(not(any(target_os = "android", target_os = "ios")))]
use clipboard_master::{CallbackResult, ClipboardHandler, Master, Shutdown}; use clipboard_master::{CallbackResult, ClipboardHandler, Master, Shutdown};
use serde_json::Value; use serde_json::Value;
@ -186,6 +187,7 @@ pub mod input {
} }
lazy_static::lazy_static! { lazy_static::lazy_static! {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub static ref CONTENT: Arc<Mutex<ClipboardData>> = Default::default(); pub static ref CONTENT: Arc<Mutex<ClipboardData>> = Default::default();
pub static ref SOFTWARE_UPDATE_URL: Arc<Mutex<String>> = Default::default(); pub static ref SOFTWARE_UPDATE_URL: Arc<Mutex<String>> = Default::default();
} }
@ -1497,6 +1499,7 @@ pub fn rustdesk_interval(i: Interval) -> ThrottledInterval {
ThrottledInterval::new(i) ThrottledInterval::new(i)
} }
#[cfg(not(any(target_os = "android", target_os = "ios")))]
#[derive(Clone)] #[derive(Clone)]
pub enum ClipboardData { pub enum ClipboardData {
Text(String), Text(String),
@ -1504,12 +1507,14 @@ pub enum ClipboardData {
Empty, Empty,
} }
#[cfg(not(any(target_os = "android", target_os = "ios")))]
impl Default for ClipboardData { impl Default for ClipboardData {
fn default() -> Self { fn default() -> Self {
ClipboardData::Empty ClipboardData::Empty
} }
} }
#[cfg(not(any(target_os = "android", target_os = "ios")))]
impl ClipboardData { impl ClipboardData {
fn image(image: arboard::ImageData<'static>) -> ClipboardData { fn image(image: arboard::ImageData<'static>) -> ClipboardData {
let hash = 0; let hash = 0;
@ -1595,6 +1600,7 @@ impl ClipboardData {
} }
} }
#[cfg(not(any(target_os = "android", target_os = "ios")))]
impl PartialEq for ClipboardData { impl PartialEq for ClipboardData {
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
match (self, other) { match (self, other) {