WaylandBackend: clipboard and primary selection support#1685
Conversation
|
It is of note that the primary selection support depends on the unstable |
|
Oh! I didn't see this, thank you for doing this, I will look at merging it soon. |
|
There seems to be a nontrivial merge conflict. While I think I figured out how to fix the conflict (just moving the I believe that commit d75b122 is the issue (particularly the part where it commented out the call to |
|
I think I was able to fix this issue with e737059, but I'm not sure if this is implemented quite correctly (particularly, I'm not sure if the current connector is the correct way to do it). Either way, I was able to rebase on top of that (https://github.com/MithicSpirit/gamescope/tree/wayland-clipboard-2), and it seems to be working properly now. I can edit this PR to use that branch instead if desired. |
|
Hello @MithicSpirit, in general for any pull request, yes, you should update the branch you're proposing to be merged to be the best iteration you have. You should be able to force push the changes to your branch that this pull request is already pointing to and it'll show here. |
2dab0fc to
836373b
Compare
836373b to
80e08de
Compare
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.
80e08de to
af39b46
Compare
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 --watchunder Sway).This also fixes an issue introduced in d75b122, which broke forwarding selections
to the host altogether, including under the (previously-working) SDL backend.