mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Merge pull request #6227 from ClSlaid/feat/osx/pasteboard-file
[feat] osx pasteboard file copy and paste support
This commit is contained in:
@@ -479,7 +479,7 @@ impl Connection {
|
||||
ipc::Data::RawMessage(bytes) => {
|
||||
allow_err!(conn.stream.send_raw(bytes).await);
|
||||
}
|
||||
#[cfg(any(target_os="windows", target_os="linux"))]
|
||||
#[cfg(any(target_os="windows", target_os="linux", target_os = "macos"))]
|
||||
ipc::Data::ClipboardFile(clip) => {
|
||||
allow_err!(conn.stream.send(&clip_2_msg(clip)).await);
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
|
||||
}
|
||||
}
|
||||
Data::ClipboardFileEnabled(_enabled) => {
|
||||
#[cfg(any(target_os= "windows",target_os ="linux"))]
|
||||
#[cfg(any(target_os= "windows",target_os ="linux", target_os = "macos"))]
|
||||
{
|
||||
self.file_transfer_enabled_peer = _enabled;
|
||||
}
|
||||
@@ -489,7 +489,7 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
|
||||
}
|
||||
match &data {
|
||||
Data::SwitchPermission{name: _name, enabled: _enabled} => {
|
||||
#[cfg(any(target_os="linux", target_os="windows"))]
|
||||
#[cfg(any(target_os="linux", target_os="windows", target_os = "macos"))]
|
||||
if _name == "file" {
|
||||
self.file_transfer_enabled = *_enabled;
|
||||
}
|
||||
@@ -512,7 +512,7 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
|
||||
let file_transfer_enabled_peer = self.file_transfer_enabled_peer;
|
||||
let stop = is_stopping_allowed && !(is_clipboard_enabled && file_transfer_enabled && file_transfer_enabled_peer);
|
||||
log::debug!(
|
||||
"Process clipboard message from cm, stop: {}, is_stopping_allowed: {}, is_clipboard_enabled: {}, file_transfer_enabled: {}, file_transfer_enabled_peer: {}",
|
||||
"Process clipboard message from clip, stop: {}, is_stopping_allowed: {}, is_clipboard_enabled: {}, file_transfer_enabled: {}, file_transfer_enabled_peer: {}",
|
||||
stop, is_stopping_allowed, is_clipboard_enabled, file_transfer_enabled, file_transfer_enabled_peer);
|
||||
if stop {
|
||||
ContextSend::set_is_stopped();
|
||||
|
||||
Reference in New Issue
Block a user