wlr-protocols/unstable
David Edmundson 8425cd06fd Add serial to data control to avoid race condition with clipboard managers
A typically clipboard manager works as follows:

 - On a new clipboard, we copy any text
- If the clipboard becomes empty (typically because a client died), we
paste our previously copied text

Our race happens as follows:

first copy:
 -    client creates a wl_data_offer
-   compositors sees it forwards it clipboard manager which copies the
text...

second copy:
 - client deletes its old wl_data_offer before creating a new one

 - compositor forwards this update to clipboard manager

- clipboard manager knows the clipboard is empty and starts its
operation to prevent an empty clipboard

 - client creates a new wl_data_offer and calls set_selection

- clipboard manager  creates a new wlr_data_offer (with the old
clipboard text) and calls set_selection

The compositor can get these last two in any order, and we end up
replacing our new clipboard content with out-of-date previous clipboard
contents.

This patch adds a serial number that can be used when a set_selection is
used in repsonse to a selection event.
2021-09-30 15:07:15 +01:00
..
wlr-data-control-unstable-v1.xml Add serial to data control to avoid race condition with clipboard managers 2021-09-30 15:07:15 +01:00
wlr-export-dmabuf-unstable-v1.xml Fix typos 2020-05-17 14:29:08 +02:00
wlr-foreign-toplevel-management-unstable-v1.xml foreign-toplevel-management: add support for fullscreening toplevels 2019-04-26 20:45:25 +03:00
wlr-gamma-control-unstable-v1.xml Amend typo in protocol 2019-11-23 10:34:01 -05:00
wlr-input-inhibitor-unstable-v1.xml Explain what happens to other clients 2018-04-03 22:10:30 -04:00
wlr-layer-shell-unstable-v1.xml layer-shell: add destroy request 2020-06-30 13:33:18 +02:00
wlr-output-management-unstable-v1.xml Address @dcz-purism's comments 2019-03-16 09:53:09 -06:00
wlr-output-power-management-unstable-v1.xml Fix typo 2020-06-04 09:58:21 +02:00
wlr-screencopy-unstable-v1.xml screencopy: Extend protocol to allow linux-dmabuf 2020-06-08 20:50:02 +02:00
wlr-virtual-pointer-unstable-v1.xml virtual-pointer: Add request for mapping to specific output 2020-02-10 21:01:07 +01:00