mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
refact, win, clipboard, notify callback, tmp commit
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -2,6 +2,8 @@ use crate::cliprdr::*;
|
||||
use hbb_common::log;
|
||||
use std::sync::Mutex;
|
||||
|
||||
const CLIPBOARD_RESPONSE_WAIT_TIMEOUT_SECS: u32 = 30;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref CONTEXT_SEND: ContextSend = ContextSend{addr: Mutex::new(0)};
|
||||
}
|
||||
@@ -27,7 +29,11 @@ impl ContextSend {
|
||||
let mut lock = CONTEXT_SEND.addr.lock().unwrap();
|
||||
if enabled {
|
||||
if *lock == 0 {
|
||||
match crate::create_cliprdr_context(true, false) {
|
||||
match crate::create_cliprdr_context(
|
||||
true,
|
||||
false,
|
||||
CLIPBOARD_RESPONSE_WAIT_TIMEOUT_SECS,
|
||||
) {
|
||||
Ok(context) => {
|
||||
log::info!("clipboard context for file transfer created.");
|
||||
*lock = Box::into_raw(context) as _;
|
||||
|
||||
Reference in New Issue
Block a user