avoid waiting too long if the clipboard message is blocked

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-06-19 22:52:17 +08:00
parent 5a8c2d9cd0
commit 733e4236c4
7 changed files with 111 additions and 115 deletions

View File

@@ -24,6 +24,13 @@ impl ContextSend {
CONTEXT_SEND.lock().unwrap().cm_enabled
}
pub fn set_is_stopped() {
let _res = Self::proc(|c| {
c.IsStopped = TRUE;
0
});
}
pub fn enable(enabled: bool, is_cm_side: bool, is_server_process: bool) {
let mut lock = CONTEXT_SEND.lock().unwrap();
if enabled {