-
Notifications
You must be signed in to change notification settings - Fork 63
clipboard: update to fork updating x11-clipboard for xcb #701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This may not completely fix the problem - allie-wake-up/cli-clipboard#13 (comment) is asking for a newer release of cli-clipboard for xcb > 1.0 (the git version has it, but last cargo release is 0.2.1 at the time of this writing (although https://github.com/ActuallyAllie/cli-clipboard/releases/ only goes up to 0.2.0)). |
Breaks the wasm build:
maybe better to switch to an updated fork of |
Note: another alternative to cli-clipboard is arboard: https://crates.io/crates/arboard --- a/src/ui/mod.rs
+++ b/src/ui/mod.rs
@@ -17,7 +17,7 @@ pub mod logo;
use crate::format;
use crate::render;
#[cfg(not(target_arch = "wasm32"))]
-use clipboard::{ClipboardContext, ClipboardProvider};
+use arboard::Clipboard;
use std::cell::{RefCell, RefMut};
use std::rc::{Rc, Weak};
use winit::event::VirtualKeyCode;
@@ -1550,8 +1550,8 @@ impl UIElement for TextBox {
#[cfg(not(target_arch = "wasm32"))]
(VirtualKeyCode::V, true) => {
if ctrl_pressed {
- let mut clipboard: ClipboardContext = ClipboardProvider::new().unwrap();
- if let Ok(text) = clipboard.get_contents() {
+ let mut clipboard = Clipboard::new().unwrap();
+ if let Ok(text) = clipboard.get_text() {
self.input.push_str(&text)
}
} works on native, but has the same/similar problem as cli-clipboard (but not rust-clipboard) when compiling on wasm:
so not using arboard for now (but ultimately, would like to use a properly supported clipboard project going forward instead of having to pin a git version, in order to more easily support updates, including from dependabot alerts). |
The rust-clipboard project's maintenance status is [unclear][1]. It pulls in an old version of [ruxt-xcb][2]. This old version has a [security issue][3]. It also has a complex build that caused failures I could not debug when building dmenu-rs with nix. There is an [open PR][4] to rust-clipboard that updates the X11 and XCB dependencies with a minimal changeset, resolving this issue. This commit updates dmenu-rs's rust-clipboard dependency to point to the fix in the open PR, located on the upgrade-x11 branch of xliiv's fork. You can find similar discussion in an unrelated project [here][5]. [1]: aweinstock314/rust-clipboard#91 [2]: https://github.com/rust-x-bindings/rust-xcb/tree/v0.8.2 [3]: aweinstock314/rust-clipboard#90 [4]: aweinstock314/rust-clipboard#89 [5]: iceiix/stevenarella#701
The rust-clipboard project's maintenance status is [unclear][1]. It pulls in an old version of [ruxt-xcb][2]. This old version has a [security issue][3]. It also has a complex build that caused failures I could not debug when building dmenu-rs with nix. There is an [open PR][4] to rust-clipboard that updates the X11 and XCB dependencies with a minimal changeset, resolving this issue. This commit updates dmenu-rs's rust-clipboard dependency to point to the fix in the open PR, located on the upgrade-x11 branch of xliiv's fork. You can find similar discussion in an unrelated project [here][5]. [1]: aweinstock314/rust-clipboard#91 [2]: https://github.com/rust-x-bindings/rust-xcb/tree/v0.8.2 [3]: aweinstock314/rust-clipboard#90 [4]: aweinstock314/rust-clipboard#89 [5]: iceiix/stevenarella#701
The rust-clipboard project's maintenance status is [unclear][1]. It pulls in an old version of [ruxt-xcb][2]. This old version has a [security issue][3]. It also has a complex build that caused failures I could not debug when building dmenu-rs with nix. There is an [open PR][4] to rust-clipboard that updates the X11 and XCB dependencies with a minimal changeset, resolving this issue. This commit updates dmenu-rs's rust-clipboard dependency to point to the fix in the open PR, located on the upgrade-x11 branch of xliiv's fork. You can find similar discussion in an unrelated project [here][5]. [1]: aweinstock314/rust-clipboard#91 [2]: https://github.com/rust-x-bindings/rust-xcb/tree/v0.8.2 [3]: aweinstock314/rust-clipboard#90 [4]: aweinstock314/rust-clipboard#89 [5]: iceiix/stevenarella#701
https://github.com/aweinstock314/rust-clipboard has no releases since 2019, there are a bunch of open pull requests: https://github.com/aweinstock314/rust-clipboard/pulls - this lack of a newer
clipboard
is holding backxcb
(though there is a pull request to update it: aweinstock314/rust-clipboard#89 - could alternatively switch to a git version) so https://github.com/iceiix/stevenarella/security/dependabot is reporting several alerts:Looking at the forks, https://github.com/ActuallyAllie/cli-clipboard is newer and has an updated xcb
Switch to use cli-clipboard to replace (rust-)clipboardUpdate to use a fork of clipboard with an updated x11-clipboard in order to update xcb