We currently only hold the last offer received, which is wrong, as both are independent and have different life cycles.
This means we have to store per-selection wl_data_offer and targets, and maintain these as appropriate from the clipboard/DnD specific entry points.
1178a0a wayland: Split handling of clipboard/DnD data offers
gdk/wayland/gdkdevice-wayland.c | 19 +++--
gdk/wayland/gdkdnd-wayland.c | 21 +++--
gdk/wayland/gdkprivate-wayland.h | 9 ++-
gdk/wayland/gdkselection-wayland.c | 155 +++++++++++++++++++++++++++---------
4 files changed, 148 insertions(+), 56 deletions(-)
Upstream: git.gnome.org