Make primary clipboard Linux only (#11843)
I guess only Linux supports the primary clipboard. Release Notes: - N/A
This commit is contained in:
@@ -625,8 +625,6 @@ impl Platform for WindowsPlatform {
|
||||
false
|
||||
}
|
||||
|
||||
fn write_to_primary(&self, _item: ClipboardItem) {}
|
||||
|
||||
fn write_to_clipboard(&self, item: ClipboardItem) {
|
||||
if item.text.len() > 0 {
|
||||
let mut ctx = ClipboardContext::new().unwrap();
|
||||
@@ -634,10 +632,6 @@ impl Platform for WindowsPlatform {
|
||||
}
|
||||
}
|
||||
|
||||
fn read_from_primary(&self) -> Option<ClipboardItem> {
|
||||
None
|
||||
}
|
||||
|
||||
fn read_from_clipboard(&self) -> Option<ClipboardItem> {
|
||||
let mut ctx = ClipboardContext::new().unwrap();
|
||||
let content = ctx.get_contents().ok()?;
|
||||
|
||||
Reference in New Issue
Block a user