mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-06-16 13:24:53 +03:00
opt: release clipboard config lock before updates (#15277)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -1426,8 +1426,11 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
self.handler.set_cursor_position(cp);
|
||||
}
|
||||
Some(message::Union::Clipboard(cb)) => {
|
||||
let lc = self.handler.lc.read().unwrap();
|
||||
if !lc.disable_clipboard.v && !lc.view_only.v {
|
||||
let clipboard_allowed = {
|
||||
let lc = self.handler.lc.read().unwrap();
|
||||
!lc.disable_clipboard.v && !lc.view_only.v
|
||||
};
|
||||
if clipboard_allowed {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
update_clipboard(vec![cb], ClipboardSide::Client);
|
||||
#[cfg(target_os = "ios")]
|
||||
@@ -1446,8 +1449,11 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
}
|
||||
}
|
||||
Some(message::Union::MultiClipboards(_mcb)) => {
|
||||
let lc = self.handler.lc.read().unwrap();
|
||||
if !lc.disable_clipboard.v && !lc.view_only.v {
|
||||
let clipboard_allowed = {
|
||||
let lc = self.handler.lc.read().unwrap();
|
||||
!lc.disable_clipboard.v && !lc.view_only.v
|
||||
};
|
||||
if clipboard_allowed {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
update_clipboard(_mcb.clipboards, ClipboardSide::Client);
|
||||
#[cfg(target_os = "ios")]
|
||||
|
||||
Reference in New Issue
Block a user