While Wine 10.0 recently debuted with the initial Wine Wayland driver, that native Wayland support is still in early form with various limitations and yet-to-be-implemented features… One of the newly-opened merge requests for filling in another gap is clipboard support for the Wine Wayland driver.
Alexandros Frantzis is back to working on new feature code for the Wine Wayland driver. Today he opened a merge request for adding clipboard support to this driver that will become increasingly important as more Linux desktops/distributions abandon their X11 session support.
Alexandros Frantzis of Collabora commented in the merge request:
“Under Wayland only applications that have the keyboard focus can interact with the clipboard (a.k.a. wl_data_device). Such constraints are not a natural fit for Wine’s current clipboard infrastructure, which uses a separate thread and window in the desktop process to act as the win32-side clipboard proxy for all native windows.
This MR tries to work within the current Wine clipboard Wine by forwarding relevant clipboard messages to the foreground window which is likely to have the keyboard focus and that can actually handle them. This works well in practice (although there are some edge cases this fails), but I am open to different ideas about implementing the clipboard integration.”
There are some known limitations of this initial clipboard support for copy/paste handling with Wine Wayland, such as some formats not yet being properly supported and some open design items around the Wayland integration.
For those curious about all the early details can see this merge request for all the details on the yet to be merged code.