wayland: Split handling of clipboard/DnD data offers

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.
This commit is contained in:
Carlos Garnacho
2015-04-07 16:40:57 +02:00
parent da395606a2
commit 1178a0ac8b
4 changed files with 148 additions and 56 deletions

View File

@ -237,10 +237,15 @@ GdkWaylandSelection * gdk_wayland_display_get_selection (GdkDisplay *display);
GdkWaylandSelection * gdk_wayland_selection_new (void);
void gdk_wayland_selection_free (GdkWaylandSelection *selection);
void gdk_wayland_selection_ensure_offer (GdkDisplay *display,
struct wl_data_offer *wl_offer);
void gdk_wayland_selection_set_offer (GdkDisplay *display,
GdkAtom selection,
struct wl_data_offer *wl_offer);
struct wl_data_offer * gdk_wayland_selection_get_offer (GdkDisplay *display);
GList * gdk_wayland_selection_get_targets (GdkDisplay *display);
struct wl_data_offer * gdk_wayland_selection_get_offer (GdkDisplay *display,
GdkAtom selection);
GList * gdk_wayland_selection_get_targets (GdkDisplay *display,
GdkAtom selection);
void gdk_wayland_selection_store (GdkWindow *window,
GdkAtom type,