diff options
Diffstat (limited to 'gdk/wayland/gdkselection-wayland.c')
-rw-r--r-- | gdk/wayland/gdkselection-wayland.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c index 846972a18e..f2d76fc3c6 100644 --- a/gdk/wayland/gdkselection-wayland.c +++ b/gdk/wayland/gdkselection-wayland.c @@ -537,6 +537,25 @@ gdk_wayland_selection_ensure_primary_offer (GdkDisplay * } } +GdkContentFormats * +gdk_wayland_selection_steal_offer (GdkDisplay *display, + gpointer wl_offer) +{ + GdkWaylandSelection *selection = gdk_wayland_display_get_selection (display); + GdkContentFormats *formats; + DataOfferData *info; + + info = g_hash_table_lookup (selection->offers, wl_offer); + if (info == NULL) + return NULL; + + g_hash_table_steal (selection->offers, wl_offer); + formats = info->targets; + g_slice_free (DataOfferData, info); + + return formats; +} + void gdk_wayland_selection_set_offer (GdkDisplay *display, GdkAtom selection_atom, |