wayland: Implement the (so far internal) primary selection protocol

Implement it using the internal copy of the protocol. Otherwise,
we just deal with it the same than clipboard selection, just mapping
it to the PRIMARY atom instead of the CLIPBOARD one.

https://bugzilla.gnome.org/show_bug.cgi?id=762561
This commit is contained in:
Carlos Garnacho
2016-02-04 17:33:51 +01:00
parent f9f5586714
commit ed3c87df7a
5 changed files with 315 additions and 60 deletions

View File

@ -37,6 +37,7 @@
#include <xkbcommon/xkbcommon.h>
#include "gdkinternals.h"
#include "gtk-primary-selection-client-protocol.h"
#include "config.h"
@ -190,6 +191,9 @@ struct wl_data_device * gdk_wayland_device_get_data_device (GdkDevice *gdk_devic
void gdk_wayland_device_set_selection (GdkDevice *gdk_device,
struct wl_data_source *source);
void gdk_wayland_seat_set_primary (GdkSeat *seat,
struct gtk_primary_selection_source *source);
GdkDragContext * gdk_wayland_device_get_drop_context (GdkDevice *gdk_device);
void gdk_wayland_device_unset_touch_grab (GdkDevice *device,
@ -242,11 +246,14 @@ 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_ensure_primary_offer (GdkDisplay *display,
struct gtk_primary_selection_offer *wp_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,
GdkAtom selection);
gpointer offer);
gpointer gdk_wayland_selection_get_offer (GdkDisplay *display,
GdkAtom selection);
GList * gdk_wayland_selection_get_targets (GdkDisplay *display,
GdkAtom selection);