0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-11 13:09:18 +00:00
termux-packages/x11-packages/alacritty/0001-disable-clipboard.patch
2024-10-25 23:50:55 +02:00

49 lines
2.4 KiB
Diff

diff --git a/alacritty/src/clipboard.rs b/alacritty/src/clipboard.rs
index 7853de47..5bdfc81b 100644
--- a/alacritty/src/clipboard.rs
+++ b/alacritty/src/clipboard.rs
@@ -4,11 +4,11 @@ use winit::raw_window_handle::RawDisplayHandle;
use alacritty_terminal::term::ClipboardType;
use copypasta::nop_clipboard::NopClipboardContext;
-#[cfg(all(feature = "wayland", not(any(target_os = "macos", windows))))]
+#[cfg(all(feature = "wayland", not(any(target_os = "android", target_os = "macos", windows))))]
use copypasta::wayland_clipboard;
-#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
+#[cfg(all(feature = "x11", not(any(target_os = "android", target_os = "macos", windows))))]
use copypasta::x11_clipboard::{Primary as X11SelectionClipboard, X11ClipboardContext};
-#[cfg(any(feature = "x11", target_os = "macos", windows))]
+#[cfg(any(feature = "x11", target_os = "android", target_os = "macos", windows))]
use copypasta::ClipboardContext;
use copypasta::ClipboardProvider;
@@ -20,7 +20,7 @@ pub struct Clipboard {
impl Clipboard {
pub unsafe fn new(display: RawDisplayHandle) -> Self {
match display {
- #[cfg(all(feature = "wayland", not(any(target_os = "macos", windows))))]
+ #[cfg(all(feature = "wayland", not(any(target_os = "android", target_os = "macos", windows))))]
RawDisplayHandle::Wayland(display) => {
let (selection, clipboard) =
wayland_clipboard::create_clipboards_from_external(display.display.as_ptr());
@@ -39,16 +39,16 @@ impl Clipboard {
impl Default for Clipboard {
fn default() -> Self {
- #[cfg(any(target_os = "macos", windows))]
+ #[cfg(any(target_os = "android", target_os = "macos", windows))]
return Self { clipboard: Box::new(ClipboardContext::new().unwrap()), selection: None };
- #[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
+ #[cfg(all(feature = "x11", not(any(target_os = "android", target_os = "macos", windows))))]
return Self {
clipboard: Box::new(ClipboardContext::new().unwrap()),
selection: Some(Box::new(X11ClipboardContext::<X11SelectionClipboard>::new().unwrap())),
};
- #[cfg(not(any(feature = "x11", target_os = "macos", windows)))]
+ #[cfg(not(any(feature = "x11", target_os = "android", target_os = "macos", windows)))]
return Self::new_nop();
}
}