Skip to content
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

WaylandBackend: clipboard and primary selection support #1685

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MithicSpirit
Copy link

This forwards the internal clipboard and primary selection to the host. However,
this does not yet add support for accessing the host's clipboard/selection
internally.

The source for both the clipboard and primary selection are recreated every
time, rather than being reused when they are still valid. Although this doesn't
seem to be necessary, it does appear to be the norm. In particular, the only
difference in behavior I could notice between the two methods is that clipboard
managers are not aware of the new copy when it is reused (this is at least the
case with wl-paste --watch under Sway).

This forwards the internal clipboard to the host, but does not handle
the primary selection nor accessing the host's clipboard internally.

The source is recreated for every new copy, rather than being reused
when it is still valid. This doesn't seem to be necessary, but doing it
differently leads to clipboard managers not becoming aware of the reused
copies (under Sway, `wl-paste --watch` doesn't notice them), which at
least suggests that not reusing is more common.
This is an extension of the previous commit, also forwarding the primary
selection to the host. This does not add support for accessing the
host's primary selection internally.
@MithicSpirit
Copy link
Author

It is of note that the primary selection support depends on the unstable primary-selection protocol. I don't care that much about that as compared to regular clipboard support, so I'm fine with dropping that part of the PR (the second commit) if preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant