patch(0): implement cliprdr for macos

Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
This commit is contained in:
ClSlaid
2023-10-29 02:15:16 +08:00
parent f6a137cd43
commit 2bb1310094
7 changed files with 146 additions and 31 deletions

View File

@@ -122,6 +122,11 @@ impl SysClipboard for X11Clipboard {
self.stop.store(false, Ordering::Relaxed);
loop {
if self.is_stopped() {
std::thread::sleep(std::time::Duration::from_millis(100));
continue;
}
let sth = match self.wait_file_list() {
Ok(sth) => sth,
Err(e) => {
@@ -131,11 +136,6 @@ impl SysClipboard for X11Clipboard {
}
};
if self.is_stopped() {
std::thread::sleep(std::time::Duration::from_millis(100));
continue;
}
let Some(paths) = sth else {
// just sleep
std::thread::sleep(std::time::Duration::from_millis(100));