mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-07-03 13:54: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);
|
self.handler.set_cursor_position(cp);
|
||||||
}
|
}
|
||||||
Some(message::Union::Clipboard(cb)) => {
|
Some(message::Union::Clipboard(cb)) => {
|
||||||
let lc = self.handler.lc.read().unwrap();
|
let clipboard_allowed = {
|
||||||
if !lc.disable_clipboard.v && !lc.view_only.v {
|
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")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
update_clipboard(vec![cb], ClipboardSide::Client);
|
update_clipboard(vec![cb], ClipboardSide::Client);
|
||||||
#[cfg(target_os = "ios")]
|
#[cfg(target_os = "ios")]
|
||||||
@@ -1446,8 +1449,11 @@ impl<T: InvokeUiSession> Remote<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(message::Union::MultiClipboards(_mcb)) => {
|
Some(message::Union::MultiClipboards(_mcb)) => {
|
||||||
let lc = self.handler.lc.read().unwrap();
|
let clipboard_allowed = {
|
||||||
if !lc.disable_clipboard.v && !lc.view_only.v {
|
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")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
update_clipboard(_mcb.clipboards, ClipboardSide::Client);
|
update_clipboard(_mcb.clipboards, ClipboardSide::Client);
|
||||||
#[cfg(target_os = "ios")]
|
#[cfg(target_os = "ios")]
|
||||||
|
|||||||
Reference in New Issue
Block a user