cage
cage copied to clipboard
Sync clipboard with host compositor
Same story as #62. Should be pretty easy but may require wlroots changes.
I'd be interested to work on this feature. I use wio for compositing, and this « clipboard sync » is needed for the clipboard to be shared between all cage instances.
If I understand the issue correctly, this would require the compositor to act as a client to the wl_data_control interface of the underlying compositor. Is that correct ?
If so, could you point me in the right direction to get started with it ? Is there already a portion of the code that's used to relay requests to a wayland server ? Also, what is the interface to use for clipboard/selection management ?
Are wlroots changes still needed?
Related Plagman/gamescope/issues/303
wlroots changes should not be necessary.
If someone want to work on this, I have a partial (only selection, aka clipboard, no primary selection or DnD), quick & dirty implementation here : https://github.com/sloonz/cage
But unless I missed something, contra emersion it will need some changes to wlroots, at minimum a public function wlr_wl_backend_get_display to be able to access the remote display. A way to access the registry without having to bind to it a second time would be nice too.
But unless I missed something, contra emersion it will need some changes to wlroots, at minimum a public function wlr_wl_backend_get_display to be able to access the remote display.
FYI, there is a wlr_wl_backend_get_remote_display()
API in wlr/backend/wayland.h. [1]
[1] https://wayland.emersion.fr/wlroots/wlr/backend/wayland.h.html#func-wlr_wl_backend_get_remote_display
I don’t know how I missed that. Will update my fork shortly.
Updated commit : https://github.com/sloonz/cage/commit/619e8f1a871c3eea76faf4d566eebd2b478bd83e
data-control does not sound like a protocol we should be using for this. The core Wayland protocol should be enough.
Do you plan to open a pull request?
data-control does not sound like a protocol we should be using for this. The core Wayland protocol should be enough.
Yeah, that’s what I realized once I was 99% done. It’s the kind of change that must be made before being made into a proper pull request.
Do you plan to open a pull request?
Not right now, I don’t really have the time. But I probably eventually will if nobody does.