YaLTeR / wl-clipboard-rs

A safe Rust crate for working with the Wayland clipboard.
Apache License 2.0
223 stars 16 forks source link

zwlr_data_control_manager_v1 version 2 -- Remediation? #8

Closed rrichardson closed 4 years ago

rrichardson commented 4 years ago

I am on fedora 30, but wl-clip fails with this message:

Error: A required Wayland protocol (zwlr_data_control_manager_v1 version 2) is not supported by the compositor

I am unfamiliar with the wayland ecosystem. Is there a way to easily rectify this, or does it require upgrading my wayland installation?

bugaevc commented 4 years ago

Shameless plug: please try wl-clipboard :)

YaLTeR commented 4 years ago

Hello! The supported Wayland protocols depend on the Wayland compositor that you use. Do you use GNOME, KDE, or perhaps something else? As far as I'm aware, zwlr_data_control_manager_v1 is currently supported only by sway and other wlroots-based compositors. For other compositors for the time being you should indeed try the regular wl-clipboard, where most of the functionality should work via other protocols.

rrichardson commented 4 years ago

I'm on Gnome, the fedora default.

I am a big i3 fan, so I can give Sway a try. My issue is that I work remotely and things like Zoom are critical, so I am reluctant to experiment too much.

Are there plans to support other protocols in this project?

bugaevc commented 4 years ago

It could be possible to implement other protocols in wl-clipboard-rs, but I think @YaLTeR wouldn't approve of it. The thing is, using those other protocols from tools like wl-clipboard[-rs] requires making use of a focus stealing hack, whereas wlr-data-control allows clipboard tools to work cleanly. wl-clipboard implements those other protocols out of necessity (because I want it to work on all the compositors), not because it's pretty.

So the right question to ask is whether GNOME has plans to implement wlr-data-control, and the answer is no. But there's this.

YaLTeR commented 4 years ago

My plan was indeed to try to refrain from implementing the focus-stealing hacks. Ideally, other compositors would support wlr-data-control, or some successor of it. There should be some movement in that direction with Wayland protocol governance starting to become more sorted out. Then either GNOME changes their mind and implements the protocol, or they provide a reasonable replacement for it (which I can add support for), or they just stick to their own in-house thing.

Either way if there's enough demand I will consider implementing the focus-stealing hacks, but thus far I think that wl-clipboard-rs is pretty unknown. Maybe that'll change with rust-clipboard finally merging the wl-clipboard-rs PR, who knows.

YaLTeR commented 4 years ago

I guess I'll close this since this isn't a concrete request to support focus-stealing hacks with sufficient demand.