Git Product home page Git Product logo

Comments (4)

DoumanAsh avatar DoumanAsh commented on June 2, 2024

are you familiar with wayland?
I don't really know it and whether there is proper API bindings.
Considering how complicated X11 is, I wouldn't be surprised if Wayland itself would be pretty complicated stuff.

In addition to that it would probably require to introduce feature to use wayland instead of x11

from clipboard-master.

gnattu avatar gnattu commented on June 2, 2024

It is very tricky to have proper support for Wayland. The Wayland standard protocol does not allow applications without a focused window to access the user clipboard, and compositors need to implement their own protocols for such use cases. wlroots-based compositors and KDE's KWin implement the wlr_data_control protocol, but GNOME's Mutter does not. So there is no good way to support all Wayland environments. wl-clipboard uses a very nasty hack which spawns a 1x1 window first and hope for the compositor to auto focus that window, then start reading the clipboard.

from clipboard-master.

gnattu avatar gnattu commented on June 2, 2024

For compositors does implement wlr_data_control protocol, we have wl-clipboard-rs which implemented reading and writing using this protocol.

from clipboard-master.

gnattu avatar gnattu commented on June 2, 2024

My own fork added very basic support to wayland for compositors implemented wlr_data_control protocol. However, due to lacking of monitoring apis being implemented, it triggers the callback by checking if the hash of the contents in the clipboard has changed, and can only be used for pure text contents. This is not suitable for upstreaming but is good enough for my own project at the moment.

from clipboard-master.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.