Wayland: Improve handling of pending data offers

The code assumed that all data offers were selections that supported
plaintext UTF-8.

The initial data offer events are now handled almost tolerably.  Only
selection data offers are used for clipboard string and only if they
provide plaintext UTF-8.  Drag and drop data offers are now rejected as
soon as they enter a surface.

Related to #2040

(cherry picked from commit 8d87be1268)
This commit is contained in:
Camilla Löwy
2022-03-23 19:58:33 +01:00
parent c89899a428
commit a31c648127
4 changed files with 93 additions and 25 deletions
+2
View File
@@ -134,6 +134,8 @@ information on what to include when reporting a bug.
- [Wayland] Bugfix: Data source creation error would cause double free at termination
- [Wayland] Bugfix: Partial writes of clipboard string would cause beginning to repeat
- [Wayland] Bugfix: Some errors would cause clipboard string transfer to hang
- [Wayland] Bugfix: Drag and drop data was misinterpreted as clipboard string
- [Wayland] Bugfix: MIME type matching was not performed for clipboard string
## Contact