Skip to content

Commit

Permalink
Disable copy feature on ARM architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
deepu105 committed Jan 22, 2024
1 parent 6238da2 commit c3ed91f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ glob-match = "0.2.1"
rand = "0.8"

# XCB is a PITA to compile for ARM so disabling the copy feature on ARM for now
[target.'cfg(any(target_arch = "x86_64", all(target_os = "macos", target_arch = "aarch64")))'.dependencies]
# [target.'cfg(any(target_arch = "x86_64", all(target_os = "macos", target_arch = "aarch64")))'.dependencies]
copypasta = "0.10.0"

[dev-dependencies.cargo-husky]
Expand Down
22 changes: 11 additions & 11 deletions src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,10 @@ async fn handle_block_scroll(app: &mut App, up: bool, is_mouse: bool, page: bool
}
}

#[cfg(any(
target_arch = "x86_64",
all(target_os = "macos", target_arch = "aarch64")
))]
// #[cfg(any(
// target_arch = "x86_64",
// all(target_os = "macos", target_arch = "aarch64")
// ))]
fn copy_to_clipboard(content: String, app: &mut App) {
use anyhow::anyhow;
use copypasta::{ClipboardContext, ClipboardProvider};
Expand All @@ -759,13 +759,13 @@ fn copy_to_clipboard(content: String, app: &mut App) {
};
}

#[cfg(not(any(
target_arch = "x86_64",
all(target_os = "macos", target_arch = "aarch64")
)))]
fn copy_to_clipboard(_content: String, _app: &mut App) {
// do nothing as its a PITA to compile for ARM with XCB and this feature is not that important
}
// #[cfg(not(any(
// target_arch = "x86_64",
// all(target_os = "macos", target_arch = "aarch64")
// )))]
// fn copy_to_clipboard(_content: String, _app: &mut App) {
// // do nothing as its a PITA to compile for ARM with XCB and this feature is not that important
// }

/// inverse direction for natural scrolling on mouse and keyboard
fn inverse_dir(up: bool, is_mouse: bool) -> bool {
Expand Down

0 comments on commit c3ed91f

Please sign in to comment.