empty clipboard after session
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
66b5b0b580
commit
f12e86be3a
@ -6,7 +6,7 @@ use std::sync::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use clipboard::{cliprdr::CliprdrClientContext, ClipboardFile, ContextSend};
|
use clipboard::{cliprdr::CliprdrClientContext, empty_clipboard, ContextSend};
|
||||||
use crossbeam_queue::ArrayQueue;
|
use crossbeam_queue::ArrayQueue;
|
||||||
use hbb_common::config::{PeerConfig, TransferSerde};
|
use hbb_common::config::{PeerConfig, TransferSerde};
|
||||||
use hbb_common::fs::{
|
use hbb_common::fs::{
|
||||||
@ -270,6 +270,15 @@ impl<T: InvokeUiSession> Remote<T> {
|
|||||||
}
|
}
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
Client::try_stop_clipboard(&self.handler.session_id);
|
Client::try_stop_clipboard(&self.handler.session_id);
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
|
let conn_id = self.client_conn_id;
|
||||||
|
ContextSend::proc(|context: &mut Box<CliprdrClientContext>| -> u32 {
|
||||||
|
empty_clipboard(context, conn_id);
|
||||||
|
0
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_job_status(&mut self, id: i32, file_num: i32, err: Option<String>) {
|
fn handle_job_status(&mut self, id: i32, file_num: i32, err: Option<String>) {
|
||||||
|
@ -16,7 +16,7 @@ use crate::ipc::Connection;
|
|||||||
#[cfg(not(any(target_os = "ios")))]
|
#[cfg(not(any(target_os = "ios")))]
|
||||||
use crate::ipc::{self, Data};
|
use crate::ipc::{self, Data};
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use clipboard::{cliprdr::CliprdrClientContext, ContextSend};
|
use clipboard::{cliprdr::CliprdrClientContext, empty_clipboard, ContextSend};
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
use hbb_common::tokio::sync::mpsc::unbounded_channel;
|
use hbb_common::tokio::sync::mpsc::unbounded_channel;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
@ -171,6 +171,14 @@ impl<T: InvokeUiCM> ConnectionManager<T> {
|
|||||||
.map(|c| c.disconnected = true);
|
.map(|c| c.disconnected = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
|
ContextSend::proc(|context: &mut Box<CliprdrClientContext>| -> u32 {
|
||||||
|
empty_clipboard(context, id);
|
||||||
|
0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "android"))]
|
#[cfg(any(target_os = "android"))]
|
||||||
if CLIENTS
|
if CLIENTS
|
||||||
.read()
|
.read()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user